Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. componentWillReceiveProps(newProps: any){
  2.  
  3. let keyword = querystring.parse(this.props.location.search).q;
  4. let newKeyword = querystring.parse(newProps.location.search).q;
  5.  
  6. if(keyword != newKeyword){
  7. //trigger redux action
  8. }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement