react-imported-component
react-imported-component copied to clipboard
Cooperation with lazy/Suspense
I'm wondering if there is a way to use Suspense and lazy on the browser side in some way together with react-imported-component. Are all the functionalities overlapping, or is RIC basically what l+S will be later when it supports SSR?
What will be the future of RIC and l+S?
The future for client side is #77, or another way to prefetch the data, making code splitting more "predictable", and, honestly, removing the original idea about Suspense - death by thousands spinners. The same logic could be used to load React.lazy, as long as it's more about pure import, than anything else.
Plus I dont think l+S would ever "support" SSR, as long as it requires integration with a bundler(like loadable-components), or injection to the code(like RIC) - "React" should not be able to afford it.
What about the integration with Concurrent React, where lazy() helps React know when to pause rendering? Can that be integrated client-side while the import promise is resolving?
I am looking forward to use React.lazy(with custom thenable) underneath, thus RIP would only orchestrate chunks loading.