UNPKG

733 BJavaScriptView Raw
1import React from 'react';
2import styles from './App.css';
3// import 'antd/dist/antd.css';
4import {Button, DatePicker } from 'antd';
5import RM from 'react-dom';
6
7import {Comp, md, id} from './test.md';
8
9import JSON from './__md__.json';
10
11console.log('json::::', JSON.A.files[0]);
12
13// const MD = JSON.A.files[0];
14
15
16class App extends React.Component {
17 constructor(props) {
18 super(props);
19 }
20
21 componentDidMount() {
22 console.log('comp:', JSON);
23 RM.render(<Comp />, document.getElementById(id));
24 }
25
26 render() {
27 return (
28 <div className={styles.app}>
29
30 <div
31 dangerouslySetInnerHTML={{ __html: decodeURIComponent(MD.md) }}
32 />
33 </div>
34 )
35 }
36}
37
38export default App;
\No newline at end of file