choojs / choojs/create-choo-app
404 handled weirdly
- Dominant language
- JavaScript
- Stars
- 180
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Description
So this is probably a thing with the router or something but I found this through the app generated by this lib so I thought I would start here ^^
My route config looks like
```js
app.route('/', require('./views/main'))
app.route('/title', require('./views/title'))
app.route('/test/:id', require('./views/test'))
app.route('*', require('./views/404'))
```
after adding 1 test route (with nothing special in it, just prints out the state)
Now when I add a button that does a pushState to `/test/4?a=4` that works great.
Then I reload the current page and I get `No route found for /test/1?a=4`.
I tried some stuff and saw that choo passes a default /404 route for, well, 404's :P which isn't there.
I would suspect it to go to `*` maybe but that doesn't seem the case.
Now when I add
```js
app.route('/404', require('./views/404'))
```
Everything seems to work, reloading on the state actually loads the right view.
I'll be glad to look into this more or give you more info if you need it
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.