React Props


  Translation results:

The main difference between state and props is that props are immutable, while state can change based on user interaction.

React Propssyntax

The main difference between state and props is that props are immutable, while state can change based on user interaction.

React Propsexample

var HelloMessage = React.createClass({
  render: function() {
    return <h1>Hello {this.props.name}</h1>;  }}); 
ReactDOM.render(
  <HelloMessage name="php.cn" />,  document.getElementById('example')


Popular Recommendations

Home

Videos

Q&A