React - Js Cheat Sheet: Quick Learning
React - Js Cheat Sheet: Quick Learning
React - Js Cheat Sheet: Quick Learning
js Cheat sheet
Quick Learning
Components
import React from 'react’
import ReactDOM from 'react-dom'
const el = document.body
const el = document.body ReactDOM.render(<Hello name='John' />, el)
Use the React.js jsfiddle to start hacking. (or the unofficial jsbin)
render () {
this.props.fullscreen const
{ fullscreen, autoplay } = this.props
···
}
render ()
{ this.state.username const { username } = this.state ··· }
Use this.State to manage Dynamic Data With Babel you can use proposal-
class-fields and get rid of constructor
render ()
{ this.state.username const { username } = this.state ··· }
Use this.State to manage Dynamic Data With Babel you can use proposal-
class-fields and get rid of constructor
See: defaultProps
See: defaultProps
this.setState({ ... })
this.state this.props