router.invalidate() is not updated the login data, means on clicking the login sign in button, signout button is not displayed
@FUNKYSTUFFM8
3 күн бұрын
I dont get my updated context values, so i cant never auth a page.. how can I resolve this ? im callinh my isAuth var and its always false in the "context" while trying to auth for redirect.. so I always get redirect to logn.. why :c
@govindpvenu
6 ай бұрын
This is what exactly i needed.Thank you
@juliomac2007
5 ай бұрын
Thanks! Best information on Tanstack Router out there! I got a little confused in the end about the login.tsx. It was kept importing the old ../utils/auth.ts? I haven't been able to make it work either because of this or because I've trying to apply it to an older JavaScript (no typescript) project.
@dziaddy
Ай бұрын
I have this problem that I can't use router.invalidate() inside my hook because it's not inside router provider.
@armanrozika
12 күн бұрын
just an opinion from a viewer, it would be better when you change file you change it with the cursor, not the shortcut. I know, you probably used to it, but we as a viewer, at least me, are having hard time focusing because the file is like changing immediately, i have no idea what file you're referring to when you said "this", "add in this". Maybe it's just me tho haha, keep up the good work!
@nhatminhhoang1469
6 ай бұрын
Hi I'm a bit confused in the last part. I created _authenticated.tsx and in the _authenticated FOLDER I have the same 2 files as you. But when I try to call the beforeLoad method on my _authenticated.tsx, it wont apply to the _authenticated folder. And it's also been show in the video
@nhatminhhoang1469
6 ай бұрын
Oh nvm. I tried to clone your repo, updated my dependency of tanstack to be the same as you. It works. Many thanks. Subcribed !
@DevLeonardo
6 ай бұрын
The development of the library is quite active so things might change if you have a different version. Great to hear updating it to the latest worked fine! :D
@pofiabel9526
4 ай бұрын
Hi! exactly what i needed, just that after loging-in, all the routes nested in _authenticated, are now turning up as 404 Not found, but when i take it out of _authenticated, it becomes found : ( please help!
@pofiabel9526
4 ай бұрын
Resolved.
@DevLeonardo
4 ай бұрын
Great to hear it's resolved! For context, what was the issue? Anyway, you can find the code of the project shown on the video here if you want a reference: github.com/Balastrong/tanstack-router-demo/tree/04-authenticated-routes
@pofiabel9526
4 ай бұрын
Nope ... Turned out not resolved 😭. Now I need that help please. When I login, I realised the is loggedIn state changes to true, but then it does not update immediately in the context, which was resulting the 404, so only when I reload the tab, then the state in the context is updated, which shouldn't be so. Any help is appreciated.
Пікірлер: 15