wix-incubator / react-module-container

Small library for building micro apps in React and Angular
MIT License
69 stars 18 forks source link

react-loadable-component fallback #72

Closed kobiburnley closed 4 years ago

kobiburnley commented 4 years ago

For components that are not loaded by the platform, but by another component, no loader is displayed. We wish to be able to show a loader while react-loadable-component fetches all resources.

odedcagan commented 4 years ago

@kobiburnley we invested quite a lot in designing a correct solution for this issue and plan to solve it in the next Q. It would be best if you could wait.

kobiburnley commented 4 years ago

@odedcagan regarding the concern of including UI in the bundle: Adding the fallback doesn't mean the UI comes from the component bundle - it can still be passed from the hosting component.

Also, can you please share more specific timelines?

kobiburnley commented 4 years ago

@odedcagan Because we need a solution really soon, for now we are considering a rewrite of ReactReloadableComponent with React.lazy + React.Suspense. What do you think?

kobiburnley commented 4 years ago

maybe even better via prop: https://github.com/wix/react-module-container/commit/855931f97708cdcce91ab46e0c5eed167a346fc2