New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not freezing #8
Comments
Hi @gunnartorfis,
On the component mount, your log-counter-loop runs a function that schedules 100 promises to the Callback Queue with a timeout of 1 s. Each second event loop takes and runs one scheduled promise. It is running with and without freezing because it's not connected to the fact of whether a component is frozen or not. It's simply handled by a separate mechanism. If there would be some state change or something that causes rerender then freeze would handle that.
To test freezing we use this example in Cheers |
Wow! Thank you so much for taking the time to give me such a thorough reply. I should have figured that out myself. Thanks again. |
I wanted to try out react-freeze so I decided to set up a test to see the before & after.
We have a React Native application with the following navigation structure:
In our "Home" screen, I wrote this (maybe overly complex) log-counter-loop, to see if it'd run before and after react-freeze. Unfortunately it's running both with and without the library.
Top of my index.js:
To make sure index.js is the first thing that's ran by the iOS part:
Here's a screen record for showcasing:
Untitled.mov
The text was updated successfully, but these errors were encountered: