Content
@
0 reply
0 recast
0 reaction
jtgi
@jtgi
use typescript they said https://github.com/TanStack/router/blob/main/packages/react-router/src/link.tsx
16 replies
15 recasts
123 reactions
timdaub
@timdaub.eth
What‘s the actual explanation here for using a type over checking a value at run time?
1 reply
0 recast
0 reaction
jtgi
@jtgi
app dev would get a compile time error. context is this is a routing lib like react-router, if an app dev did something like: <Link to="/users" /> and users wasn't registered it'd compile err. vscode etc would also autocomplete the value.
2 replies
0 recast
0 reaction