feimosi / frameworks-code-comparison

:vs: :fire: Code comparison of modern web frameworks, based on React, Angular and Vue.js
89 stars 29 forks source link

react form with example and link added #35

Closed M-ZubairAhmed closed 6 years ago

M-ZubairAhmed commented 6 years ago

Issue

https://github.com/feimosi/frameworks-code-comparison/issues/3

Code snippet

import React from 'react'

export default class ReactForm extends React.Component {
  constructor(props) {
    super(props)
    this.state = {
      formValue: ''
    }
  }

  handleChange = event => {
    this.setState({
      formValue: event.target.value
    })
  }

  render() {
    return (
      <form>
        <input
          value={this.state.formValue}
          placeholder="Enter value"
          onChange={this.handleChange}
        />
      </form>
    )
  }
}
M-ZubairAhmed commented 6 years ago

Please review and let me know if you would like some changes to be made to this PR

M-ZubairAhmed commented 6 years ago

Changes are made to the PR

feimosi commented 6 years ago

Looks good :+1: