Skip to content

Instantly share code, notes, and snippets.

@argodeep
Created June 26, 2020 14:49
Show Gist options
  • Select an option

  • Save argodeep/b82806f64207b0a7508d8f6181700b52 to your computer and use it in GitHub Desktop.

Select an option

Save argodeep/b82806f64207b0a7508d8f6181700b52 to your computer and use it in GitHub Desktop.
React Hooks
// Functional component
function Filter(props) {
const [keyword, setKeyword] = useState('');
console.log(props)
// ...
}
// class based component
class Filter extends Component {
constructor(props) {
super(props)
this.state = { keyword: '' }
console.log(this.props)
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment