dbrrt dbrrt - 3 years ago 186
React JSX Question

Hashtag character in JavaScript routing libraries?

I sometimes see some web applications in production with this below routing pattern :

, in Angular applications, but this's not opiniated to one library.

What is/are the benefit/s of using the character
in routes?

Win Win
Answer Source

hashRouter is normally used when you're not sure if your server supports pushState and you want the ability to move between routes within your application and keep the UI in sync. This is also used if you want to support browsers that don't support pushState.

Everything after the hash will be matched to your routing library.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download