zooniverse / vox

Voting app
Apache License 2.0
0 stars 1 forks source link

Hash suffix necessary? #34

Open simoneduca opened 7 years ago

simoneduca commented 7 years ago

What is it?

rogerhutchings commented 7 years ago

What hash suffix?

camallen commented 7 years ago

@rogerhutchings the hash suffix in the app URL once deployed.

image

rogerhutchings commented 7 years ago

Oh. I'm pretty sure hash-based routing is the default on the starterify project. https://github.com/ReactTraining/react-router/blob/master/docs/guides/Histories.md

If you set up history routing and the user tries to navigate to a route that isn't there, you have to set up the bucket 404 to return index.html instead, and have a catch all route in the router to handle it

simoneduca commented 7 years ago

We use react-router and browserHitory in PFE too, so why don't we see those hashes there?

rogerhutchings commented 7 years ago

PFE uses browserHistory, hence no hash. Vox isn't configured to use browserHistory, so I believe it defaults to hashHistory, so hashes.

simoneduca commented 7 years ago

Doh, of course. I'm wondering if we can remove react-router from vox, given there's no navigation happening. The advantage would be to have readable urls.