react function, installation environment

  • constructor () {} Constructor
  • componentDidMount () {} function lifecycle
  • render () {} function rendering
  • state status

fetch('/index/x')
.then(res=>res.json())
.then(data=>{this.setState({data:data})})

sleep (in seconds) to sleep for a few seconds server

fetch().then((res)=>res.text()).then(data=>{console.log(data)})

-G install the Create-REACT 1.npm-App
2.cd create a folder where
3.create-react-app Create a folder name
4.package.json file to add a "Proxy": " HTTP: // localhost: 80 "
5.CD name
6.npm RUN Start
7.src / app.js src / app.css

spa single page application single-page application
1.es6
2. virtual DOM
3. element assembly (JSX)
4. assembly props state event
information transfer between components 5

antd --save install npm
antd / dist / antd.min.css introduced css styles

npm install react-router-dom

{Import
BrowserRouter Router AS,
the Route, want to be replaced writing position
Link

}
Path Component
Exact accurately hit the

table
columns列 dataSource

JSON.s
tringify ({}) of the sequence

filter (v => v, id! == id) with a map when you delete one

Guess you like

Origin www.cnblogs.com/liuxuhui/p/12157543.html