rarely active
rarely active
SSolidJS
Created by rarely active on 1/2/2025 in #support
Unexpected behavior when dealing with stores (createStore)
Hello everyone, so I have this line of code:
{data.user ? <A href={`/years/${data.user.position || "fy"}`}>Begin studying</A> : <A href="/login"><FaBrandsMicrosoft /> Login</A>}
{data.user ? <A href={`/years/${data.user.position || "fy"}`}>Begin studying</A> : <A href="/login"><FaBrandsMicrosoft /> Login</A>}
It works perfectly but when the user logs out (user sets to null), they get this error in the console:
TypeError: Cannot read properties of null (reading 'position')
5 replies