标签:which word cannot with col man import bit sele
component and views : produce html abd add them on a page( in the dom)
<import React from ‘react‘> // core react library, know how to work with component. Create or manage a Dom <import ReactDOM from ‘react-dom‘> //render component to dom const App = function(){ return <div>HI!</div> }; // this is a component class, could produce a lot of instance.
const: ES6 syntax, declare a variable. And which means it won‘t change because it is constant
JSX:
ReactDOM.render(<App />, document.querySelector(‘.container‘)); //render component into dom // transpire would translate JSX into javascript
// <App />is a simple instance of component App
const App1 = () => { return <div>Hi!</div>; } // => equals to keyword:this
标签:which word cannot with col man import bit sele
原文地址:http://www.cnblogs.com/ninalei/p/7841790.html