Commit f8317f15 authored by Arunoda Susiripala's avatar Arunoda Susiripala

Add an case to show when dynamic import components won't load.

parent aeaccf44
export default () => (
<p>Hello World 5 (imported dynamiclly) </p>
)
......@@ -20,6 +20,8 @@ const DynamicComponentWithAsyncReactor = asyncReactor(async () => {
return (<Hello4 />)
})
const DynamicComponent5 = dynamic(import('../components/hello5'))
export default () => (
<div>
<Header />
......@@ -27,6 +29,14 @@ export default () => (
<DynamicComponentWithCustomLoading />
<DynamicComponentWithNoSSR />
<DynamicComponentWithAsyncReactor />
{
/*
Since DynamicComponent5 does not render in the client,
it won't get downloaded.
*/
}
{ React.noSuchField === true ? <DynamicComponent5 /> : null }
<p>HOME PAGE is here!</p>
<Counter />
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment