feat(v2): implement ComponentCreator (#1366)

* v2(feat): convert blog to view-driven content queries

* feat(v2): port blog to use ContentRenderer

* misc(v2): fix test and change ContentRenderer url

* avoid chunkName collision

* avoid chunkname collision more

* fix(v2): fix content-renderer ssr problem (#1367)

* wip

* avoid chunk names collision

* ContentRenderer is a wrapper for Loadable

* convert docs and pages

* nits and rename

* rename routeModules -> modules

* remove lodash from component creator

* resolve chunk not being picked up correctly

* add comment for explanation

* small refactoring
This commit is contained in:
Yangshun Tay 2019-04-16 07:18:29 -07:00 committed by Endilie Yacop Sucipto
parent 0ac2441d23
commit 96cb4672d5
14 changed files with 220 additions and 80 deletions

View file

@ -14,14 +14,14 @@ import Head from '@docusaurus/Head';
import styles from './styles.module.css';
function DocBody(props) {
const {metadata, modules} = props;
const {metadata, content} = props;
const {language, version} = metadata;
const context = useContext(DocusaurusContext);
useEffect(() => {
context.setContext({metadata});
}, []);
const DocContents = modules[0];
const DocContents = content;
return (
<div className={styles.docBody}>
<Head>