Closed swham-ai closed 4 years ago
You can override the default component shown with a component that returns null.
const loadingFn = ({ page }) => import(`./${page}`)
const loadingOptions = {
loading: () => null,
}
const UniversalComponent = universal(loadingFn, loadingOptions)
Alternatively, you can use loadingTransition: true
(see README).
Thank you very much it helped
const loadingOptions = {
loading: () => null,
loadingTransition: false
}
const UniversalComponent = universal(props => import(`./${props.page}`), loadingOptions)
Currently I am using react-universal-component with code-splitting...
Everytime I switch page it shortly displays "Loading..." like 0.1 second then render the proper page.
I just want to delete "Loading..." so that there is no blinking while switching any page. How can I do that with react-universal-component? is there any example?