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