-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make asyncComponentLoader an independent utility
- Loading branch information
1 parent
7162653
commit f91be81
Showing
2 changed files
with
50 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import _asyncComponentLoader from './loader'; | ||
|
||
import Loading from 'components/Loading'; | ||
import LoaderErrorBoundaryFallback from 'errorHandling/Fallbacks/Loader'; | ||
import { loader as loaderDefaultOptions } from 'config'; | ||
|
||
const asyncComponentLoader = ( | ||
loadComponent, | ||
loaderOptions = loaderDefaultOptions, | ||
FallbackWaiting = Loading, | ||
FallbackFail = LoaderErrorBoundaryFallback, | ||
) => _asyncComponentLoader(loadComponent, loaderOptions, FallbackWaiting, FallbackFail); | ||
|
||
export default asyncComponentLoader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters