Module: Helpers
Pure functions and helpers with useful functionality
Helpers
lazier
▸ lazier<T>(importFactory, importName): LazyExoticComponent<T>
Summary
A function that modifies react lazy to allow for named exports
Example
const ExampleUI = lazier(() => import('./exampleui/ExampleUI'), 'ExampleUI');
Type parameters
| Name | Type |
|---|---|
T | extends ComponentType<any> |
Parameters
| Name | Type | Description |
|---|---|---|
importFactory | () => Promise<{ [name: string]: T; }> | a callback that imports e.g. () => import('./exampleui/ExampleUI') |
importName | string | the named export you want to import. |
Returns
LazyExoticComponent<T>