{"size": 558, "ext": "js", "max_stars_repo_path": "LetsCode/React-JS/web-react-app/src/components/ClassesStates.js", "max_stars_repo_name": "DarcisioAlmeida/Programacao-e-Desenvolvimento", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "LetsCode/React-JS/web-react-app/src/components/ClassesStates.js", "max_issues_repo_name": "DarcisioAlmeida/Programacao-e-Desenvolvimento", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "LetsCode/React-JS/web-react-app/src/components/ClassesStates.js", "max_forks_repo_name": "DarcisioAlmeida/Programacao-e-Desenvolvimento", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.9285714286, "max_line_length": 68, "alphanum_fraction": 0.5698924731}
// Uso de Classes Estados React - Componentes de estados dinamicos//
import React from 'react'

class ClassesStates extends React.Component {
  constructor(props) {
    super(props)
    this.state = {nome: '', idade: 26}
  }
  
  changeName = (event) => {
    this.setState({nome: event.target.value})
  }

  render() {
    return (
      <>
        Nome: <input 
          type="text" 
          value={this.state.nome}
          onChange={this.changeName}
        />
        <p>Olá {this.state.nome}</p>
      </>
    )
  }
}

export default ClassesStates;