-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trigger all component hooks #38
Comments
+1 |
1 similar comment
+1 |
I think my answer #47 covers why this wont work |
it's cover why this won't work but it doesn't helped us at all :) |
Hey guys, I opened up a related ticket, but I'm trying to get this working with a decorated top level component and redirects if the user is not logged in. Anyways to get this fetching data only if they are logged in? My guess is not since this library only knows the route and the top level component and not whether an auth check was passed further down. |
@Aryk you could pass the auth state into locals and then conditionally load. I don't know how you're doing routing, but I would recommend doing the auth redirect logic elsewhere (react-router has onEnter which is useful) |
Hi @davidfurlong , I think I understand what you are saying, basically, I will need to pull the auth data from the state and check against that. However, this seems a little duplicative because the logic for this is in the decorated component as well, but I think I could manage that. |
@Aryk as I said, I wouldn't recommend doing it by passing auth into redial locals, but it will work. |
Does Redial supports multiple trigger when many components is displayed on the same page? It's on an universal implementation
For example:
article.js
list.js
client.js
server.js
Thanks for your help!
The text was updated successfully, but these errors were encountered: