ReactJS: TextField

This entry is part 23 of 35 in the series React JS

See the Pen React – TextField by daryl (@darylw) on CodePen.0

class MyApp extends React.Component {
  render() {
    return (
      <TextField 
        placeholder="Enter your name"
      />
    );
  }
};

class TextField extends React.Component {
  constructor (props) {
    super(props);
  }
  
  render () {
    return (
      <input
        onChange={this.handleKeyPress}
        type="text"
        placeholder={ this.props.placeholder } 
        value=""
      />
    );
  }
};

React.render(<MyApp/>, document.querySelector('#myapp'));
Series Navigation<< ReactJS: Preview Image
ReactJS: Button >>