Created
November 24, 2018 11:37
-
-
Save productioncoder/0e0e011c97729484e6f70bdc45a44916 to your computer and use it in GitHub Desktop.
Youtube in React: get search query from URL
This file contains 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
import {getSearchParam} from '../../services/url'; | |
/* ... */ | |
class Search extends React.Component { | |
/* ... */ | |
getSearchQuery() { | |
return getSearchParam(this.props.location, 'search_query'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment