You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
👋 Hey team, I am experimenting with integrating reassure into my monorepo. We maintain 2 packages: web and mobile.
For mobile (react-native) we are seeing an issue where all benchmarks show 0.0 ms render duration for all tests. When I affect render counts, we are able to see changes show up in the mobile benchmarks.
This is not the case for web (react) package which shows correct render and duration info.
The text was updated successfully, but these errors were encountered:
@siddharthkul thanks for reporting this. As far as I can tell from the source code, it seem that the onRender callback from React.Profiler got called exactly one per each component (you have render count == 1). This is the first issue of such type, so I can guess that one of the following have happened:
You are testing really small components and a relatively fast machine and they really render under 0.5ms, which gets rounded to 0.
You have some mocking that effectively makes the components really cheap to render (see pt. 1)
You are using Jest fake timers which might interfere with React.Profiler component
What you could do is to add artificial code to your component(s) with the purpose of slowing them down to detect if Reassure can pick it up. Something like:
function MyButton() {
// Dummy code to make sure component has non-zero render time
for (let i = 0; i < 10_000; i += 1) {
console.log("AAA");
}
return <JSX... />
}
Describe the bug
👋 Hey team, I am experimenting with integrating reassure into my monorepo. We maintain 2 packages: web and mobile.
For mobile (react-native) we are seeing an issue where all benchmarks show 0.0 ms render duration for all tests. When I affect render counts, we are able to see changes show up in the mobile benchmarks.
This is not the case for web (react) package which shows correct render and duration info.
The text was updated successfully, but these errors were encountered: