Как проверить, есть ли URL хэш в React
if(window.location.hash) {
// Fragment exists
} else {
// Fragment doesn't exist
}
Thankful Tortoise
if(window.location.hash) {
// Fragment exists
} else {
// Fragment doesn't exist
}