Combobox with React Suspense and Data Fetching
1–2 of 2 posts
Re: Combobox with React Suspense and Data Fetching
#2What about very large cases, like the life time of the app? The loading components are to be "dumb". What if I can make a smart loading component? SVG animations with a timer which emits events or has a brain.js implementation.
I think component ownership of state is always going to be left to the programmer. I wrote an app which uses Event Emitters in useEffect hooks. Those only change based on specific state variables. I have another hook which reads from local storage once when the component loads.
All that needs to be tested out now. If the component suspends, I should be able to send events, change state and debounce renders. I hope it works. No complex parents or portals, and fast renders with a flame graph with a lot of holes at the bottom.