Skip to content
This repository has been archived by the owner on Jan 8, 2023. It is now read-only.

default route to directory #6

Open
4www opened this issue Aug 10, 2017 · 5 comments
Open

default route to directory #6

4www opened this issue Aug 10, 2017 · 5 comments

Comments

@4www
Copy link
Contributor

4www commented Aug 10, 2017

Switch the default route to directory so when a user opens the apps there is the list of radios visible.

It is actually more complex that it looks...

@oskarrough
Copy link
Member

do we need @jfalxa?

@jfalxa
Copy link
Contributor

jfalxa commented Aug 11, 2017

hi, does this do the job? https://reacttraining.com/react-router/web/api/Redirect

@4www
Copy link
Contributor Author

4www commented Aug 11, 2017

ty, will try, but not sure.

@jfalxa
Copy link
Contributor

jfalxa commented Aug 11, 2017

Yeah you right, it won't work by itself. If you <Redirect from="/" to="/directory" /> then you won't be able to get to / anymore...

As you want to show the directory when the user opens the app, wouldn't it make more sense to make it a part of the / component? That way you could manage its visibility status directly with state rather than with route.

@4www
Copy link
Contributor Author

4www commented Aug 11, 2017

Yes exactly. I wanted to have a route, I am not sure why but it made sense at some point.
Now I think you have the right approach.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants