Home >> Tutorials >> Reactjs State
Previous Page

React Props

State in React.js

State of a component is an object that holds some information that may change over the lifetime of the component.
class Message extends React.Component {
  constructor(props) {
    super(props)
	
    this.state = {
      message: 'Welcome to React js Interview Questions.'
    }
  }

  render() {
    return (
      

{this.state.message}

) } }
Previous Page

React Props

Full Stack Tutorials

Author @FullStackTutorials | View all Articles