react-isomorphic-starterkit icon indicating copy to clipboard operation
react-isomorphic-starterkit copied to clipboard

Pass route params to handlers and demonstrate how they are used

Open csk157 opened this issue 10 years ago • 4 comments

It wasn't straightforward to setup routes with params, therefore I think it would be a good idea to always pass router parameters to as queryParams to the route handlers.

I also added a very basic example to demonstrate how it would work (with API).

Not sure, but it might be related to https://github.com/RickWong/react-isomorphic-starterkit/issues/54 and https://github.com/RickWong/react-isomorphic-starterkit/issues/56

csk157 avatar Aug 19 '15 19:08 csk157

Hi @csk157 thanks for this Pull Request. It looks great, but instead of a random example, we would much rather do stargazers-pagination to demonstrate multiple routes + params. What do you think?

RickWong avatar Aug 19 '15 22:08 RickWong

Hi @RickWong, sounds good. I would create a different route (component), which would mimic the behaviour of the Main route, just with manual pagination of the stargazers. So, both routes would essentially accomplish the same thing, but in slightly different ways. What do you think?

csk157 avatar Aug 20 '15 07:08 csk157

Or maybe, you could click on the images in that Main list and open a route where it shows some information about the user (/stargazers/:githubUserName)?

csk157 avatar Aug 20 '15 08:08 csk157

@csk157 I would love to see an example of both: manual pagination and stargazers detail route (/stargazers/:githubUserName).

edimoldovan avatar Sep 03 '15 22:09 edimoldovan