1. 程式人生 > >React基礎

React基礎

sta type bsp roo dal react element script com

1.最基礎的語法

<script src="https://unpkg.com/react@16/umd/react.development.js"></script> <script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> <script src="https://unpkg.com/[email protected]/babel.min.js"></script> <body> <div id="root"></div> </body> <script type="text/babel">

...

ReactDOM.render(

"asd",document.getElementById(‘root‘)

);

React基礎