-
-
Notifications
You must be signed in to change notification settings - Fork 591
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
Prevent re-renders/parse if html didn't change? #263
Comments
Also facing this - calling |
Right now, "solved" it (not entirely) by wraping the component inside a pure component and being very careful about what props I pass to it. But I still think this should be improved. |
Hmm, looks like a re-render is still needed if orientation changes, otherwise all text becomes messed up when used inside a scroll view. However, I would expect just a re-render and not a whole child component rebuild. |
This feature has been implemented in the foundry pre-release (#434). You can now use As of version 6.0.0-alpha.21, this will apply only to Transient Render Engine props (all styles props, renderers, TRE options ...), since only these are frozen by default. Those passed directly to the React renderer are reactive by default. This might change as the API for v6 is not stable yet. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Closing now since the stable beta which fixes this issue has just been released. |
Is this a bug report or a feature request?
Question
Have you read the guidelines regarding bug report?
Yes
Have you read the documentation in its entirety?
Yes
Have you made sure that your issue hasn't already been reported/solved?
Yes
Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?
Both
Is the bug reproductible in a production environment (not a debug one)?
Yes
Have you been able to reproduce the bug in the provided example?
Yes
Environment
Any
Hello,
I'm having the following issue. Each time the parent renders, all my custom
renderers
are called again, creating new objects every time. What's the recommended way to prevent this?For example.
Each time the parent component renders, the above will be called and a whole new component built. This quickly becomes an issue and the counter value goes to the roof. I would expect that if the html didn't change, these won't be called/re-rendered.
The text was updated successfully, but these errors were encountered: