#How to redirect unauthenticated without ...

1 messages ยท Page 1 of 1 (latest)

wind iris
#

in your page you can check:

if (!isLoading && !user.authenticated){
  return null;
}

right before your main return

lament ice
#

that authenticated from (user.authenticated) where it comes from

#

i've added this

#

got this error

#

Uncaught Error: Too many re-renders. React limits the number of renders to prevent an infinite loop.

#

this is my page

wind iris
lament ice
#

fetch data

#

to laravel

lament ice
wind iris
#

the data fetching is OK, but I don't know the hook

lament ice
#

is working

#

If is not authenticated

#

it redirect to the homepage

#

this would help ?

lament ice
wind iris
lament ice
#

Im scared of it

lament ice
#

To try something new

#

I dont know how to make it work, on api, based token

#

I've read all docs