Created
July 23, 2018 22:57
-
-
Save Om4ar/9b55ae47d49c45fbd01e46dc378379ec to your computer and use it in GitHub Desktop.
how to deal with hash change in react
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| componentDidMount() { | |
| window.addEventListener("hashchange", this.props.ShowTabWithHash, false); | |
| } | |
| componentWillUnmount() { | |
| window.removeEventListener("hashchange", this.props.ShowTabWithHash, false); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment