Skip to content

Instantly share code, notes, and snippets.

@tsh-code
Created October 3, 2018 12:17
Show Gist options
  • Save tsh-code/a26f2ac12404adebe32a8b5d7757ecb5 to your computer and use it in GitHub Desktop.
Save tsh-code/a26f2ac12404adebe32a8b5d7757ecb5 to your computer and use it in GitHub Desktop.
import * as React from 'react';
import { createRoute } from 'router-8000';
async function getRouteComponent(): JSX.Element {
const Component = await import(/* webpackChunkName: "landing" */'views/landing/container').LandingViewContainer;
return <Component />;
}
createRoute('/', getRouteComponent);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment