Why useRouteData can return undefined?
In this example:
If I'm not an admin I'm redirected.
If no organisation is found with the
id
, prisma throw.
So I'm sure const organisation
should be defined. But the type is still
Why?7 Replies
Should I really enclose JSX with Show/Suspence to assert the value of organisation?
It seems boilerplaty, so I'm wondering if I must do something else..
GitHub
solid-start/[id].tsx at 20c1491e291334b8e3a6f60e3ad7af1316e0bc3c · ...
SolidStart, the Solid app framework. Contribute to solidjs/solid-start development by creating an account on GitHub.
story()!
?Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
feels hacky ^^'
There is a solution for this coming in 2.0, it'd just be breaking right now.
Mind you I will probably still use the
!
in my codeI think it's just a barrier to break,
!
exists for a reason and this one is a valid one to use. Counter intuitive, so I was wondering if I was doing something wrong ^^