React-Router Location Hash #️⃣
Want to do cool things with the hash element of a URL, using React-Router? You can!
React-Router's location
contains a hash
key:
{
key: 'ac3df4',
pathname: '/somewhere'
search: '?some=search-string',
hash: '#hereiam',
state: {
[userDefined]: true
}
}
Anywhere location
is available, pull off hash
(defaults to an empty string) and have fun!