The app contains a straightforward screen with a button that increments a state, triggering a re-render. The root of the App is wrapped with <PerformanceProfiler /> content layer.
When I press the Rerender button I get the following error
ERROR RenderTimeoutError: Screen 'ScreenA' failed to render in 5000 milliseconds. One of the following could happen:
1. You notified the profiler of the navigation-start event via the useStartProfiler hook, but forgot to notify of the render-completion event via <PerformanceMeasureView/>
Read the usage here: https://shopify.github.io/react-native-performance/fundamentals/measuring-render-times.
2. You use useStartProfiler hook instead of useResetFlow hook when re-render is occurring because the flow is essentially being restarted.
Read the usage here: https://shopify.github.io/react-native-performance/fundamentals/measuring-render-times#3-measuring-screen-re-render-times.
The state at timeout was: {
"name": "Started",
"destinationScreen": "ScreenA",
"componentInstanceId": "0",
"previousState": "Rendered",
"timestamp": {
"jsTimestamp": 1693757078630
},
"operationsSnapshot": {
"operationTimestamps": {}
},
"ongoingOperations": {
"operationTimestamps": {}
},
"sourceScreen": "ScreenA",
"type": "flow_reset"
}.
Not sure what is wrong with the code, any help would be much appreciated.
Current behavior
Attempting to measure re-rending times causes an exception.
Expected behavior
The library should be able to measure re-render times as advised in https://shopify.github.io/react-native-performance/docs/fundamentals/measuring-render-times.
To Reproduce
Here is the repro https://github.com/GiridharKarnik/RerenderFlow.
Platform:
Packages
Which packages are affected by the issue?
Environment
The package versions can be referred from the repo link pasted above.
Additional info
The app contains a straightforward screen with a button that increments a state, triggering a re-render. The root of the App is wrapped with
<PerformanceProfiler />
content layer.When I press the Rerender button I get the following error
Not sure what is wrong with the code, any help would be much appreciated.