[2.x] Component helper for lazy loading components
- Dominant language
- PHP
- Stars
- 6.7k
- Forks
- 883
- Avg merge
- 15h 16m
- Merged PRs (30d)
- 73
Description
Similar to React's `` (but way less complex), pass a code split component and optionally a custom loader to show while it is being imported.
A simple "just loading" component could be fairly nice for components that don't need to be tightly integrated with the parent, just to avoid a lot of boilerplate loading indicators and stuff. Not necessarily as complicated as the Suspense as that goes deep in the children, but just for a single component.
Something like this (might make sense to do it some other way, but you get the idea)
```js
This text is shown while loading
```
I could see this also being useful perhaps to just show a `LoadingIndicator` when the param `loading` is true, maybe. But that's not the focus.
Contributor guide
Assessment
This issue has not been assessed yet.