reagent-project / reagent-template

A Leiningen template for projects using Reagent.
MIT License
394 stars 55 forks source link

Passing route params to reagent app #126

Closed hackeryarn closed 7 years ago

hackeryarn commented 7 years ago

Would it be possible to provide an example in the readme of passing route params to the Reagent router?

Base route works fine and you are able to navigate to Reagent links from there. However, if you try to navigate directly to a route provided by Reagent, you get a Not found page.

I am fairly new to Ring, so this might be just my lack of knowledge on how to handle this.

yogthos commented 7 years ago

You would need to define the routes on the server or have a catchall * route. You can see an example here where the server side routes are defined to match the ones defined on the client here.

hackeryarn commented 7 years ago

Thanks for the help. That just makes too much sense.

I was expecting a behaviour similar to rails and need to explicitly pass the path to the spa.

yogthos commented 7 years ago

👍