-
Notifications
You must be signed in to change notification settings - Fork 812
Open
Description
I am...
| -------------------------------------------------------------------------------------------------
Requesting a new feature |
---|
Proposal/Feature-request:
Add callback to render
function to run code inside TestRenderer.act
function.
react-sketchapp/src/buildTree.ts
Lines 96 to 99 in b238e69
TestRenderer.act(() => { | |
// synchronous callback | |
renderer = TestRenderer.create(element); | |
}); |
This should allow for Relay data fetching to occur before the component is rendered: https://relay.dev/docs/guides/testing-relay-components/#examples
I’ll work on hacking together a demo for this with a mock GraphQL Relay API; this could be expanded to having a full Relay example in this repo.
Metadata
Metadata
Assignees
Labels
No labels