UNPKG

648 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
9const MD = require('./test.md');
10
11
12class App extends React.Component {
13 constructor(props) {
14 super(props);
15 }
16
17 componentDidMount() {
18 console.log('comp:', MD);
19 RM.render(<MD.CompA />, document.getElementById(id));
20 }
21
22 render() {
23 return (
24 <div className={styles.app}>
25 <div
26 dangerouslySetInnerHTML={{ __html: decodeURIComponent(md) }}
27 />
28 </div>
29 )
30 }
31}
32
33export default App;
\No newline at end of file