Skip to content

Introduce input change handlers in PokemonCard #7

Description

@marktani
  handleNameChange = e => {
    this.setState({name:e.target.value})
  }
  
  handleUrlChange = e => {
    this.setState({url:e.target.value})
  }
  render () {
    return (
      <div className='w-100 pa4 flex justify-center'>
        <Card style={{ maxWidth: 400 }}>
          <input
            className='w-100 pa3 mv2'
            value={this.state.name}
            placeholder='Name'
            onChange={this.handleNameChange}
          />
          <input
            className='w-100 pa3 mv2'
            value={this.state.url}
            placeholder='Image Url'
            onChange={this.handleUrlChange}
          />
// ...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions