Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Last active November 25, 2018 10:59
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Youtube in React: saving the entered text in the local state
/* ... */
import {Link, withRouter} from 'react-router-dom';
export class HeaderNav extends React.Component {
constructor(props) {
super(props);
this.state = {
query: '',
};
}
/* ... */
}
export default withRouter(HeaderNav);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment