41 ms·
I just run force update on the root component 60 times a second and import the global state in every component that needs data from the store.
by Kiro 4y ago
I just run force update on the root component 60 times a second and import the global state in every component that needs data from the store.
- yulaow 4y agoThink of the user having a number of games running in parallel equal to the usual number of tabs you have open in the browsers.
- Kiro 4y ago(Sorry, I edited my comment and removed the game reference and optimization question before I saw your comment.) I mean, sure but the DOM is not even a factor compared to the actual WebGL rendering going on. The DOM is only used for UI, menus and things like that. So the bottleneck would still not be React or how I handle state.
- wruza 4y agoYou may consider using some “schedule re-render everything at the next animation frame after an event” type of library instead.