Created
May 4, 2017 20:44
-
-
Save xtuc/b484a93dc0b5039a2abdbea2d2d81ac5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import {asyncReactor} from 'async-reactor'; | |
import pEvent from 'p-event'; | |
function Loader() { | |
return ( | |
<div className='container'> | |
<div className='box'> | |
<h1>Please mouseover me!</h1> | |
</div> | |
</div> | |
); | |
} | |
async function Component() { | |
await pEvent(document, 'mouseover'); | |
const NewsFeed = await import('./Newsfeed') | |
return ( | |
<div className='container'> | |
<div className='box'> | |
<NewsFeed /> | |
</div> | |
</div> | |
); | |
} | |
export default asyncReactor(Component, Loader); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment