FormidableLabs / redux-little-router

A tiny router for Redux that lets the URL do the talking.
MIT License
1.04k stars 114 forks source link

Problem in Advanced Docs for server rendering: change app.use to app.get #151

Closed benmcmaster closed 7 years ago

benmcmaster commented 7 years ago

I noticed that when I reloaded my page on localhost:8080/about, routerForExpress would put the /about in the basename instead of the pathname. Which would mess up the routes on the browser. However when I changed:

app.use('/*', (req, res) => {

to

app.get('/*', (req, res) => {

as it is in the demo/server/index.js. It now works and the pathname is correct.

Will changing it to app.get cause any problems?

tptee commented 7 years ago

Done in #152 . Thanks for the PR!