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
While trying to bring in an audio plotter library, I noticed that when I ask for one instance of my view to be rendered, two are instantiated.
Fearing that I'm doing something wrong, I started to dig deeper and created a test project where I duplicated the tic-tac-toe project and rendered a single scroll view, modified the RCTCustomScrollView class accordingly:
So in order for the react diffing algorithm to correctly reset properties back to their default state, we create a single dummy "defaultView" for every type of view so we know what value the properties should be reset to if the property of deleted or nulled out on the JS side. This is probably the second instantiation you're seeing, and your views need to be resilient to creating multiple instances (but I think there might also be a mechanism to provide the default view manually, so you could potentially use a singleton if you wanted, but that would probably break things).
If you are seeing more than one extra view than you are expecting being instantiated, let me know.
While trying to bring in an audio plotter library, I noticed that when I ask for one instance of my view to be rendered, two are instantiated.
Fearing that I'm doing something wrong, I started to dig deeper and created a test project where I duplicated the tic-tac-toe project and rendered a single scroll view, modified the RCTCustomScrollView class accordingly:
Implemented via:
The text was updated successfully, but these errors were encountered: