Replies: 1 comment 1 reply
-
I was thinking about adding some utilities for body validation, but I think https://github.com/rileytomasek/zodix does a great job here |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was tired of writing
invariant()
when requiring params to be strings (in loader, actions, or the route component).So I ended up with:
To be used as:
This will throw if not defined (but it should be when using at the right place) and will ensure type safety.
Quite handy with many params:
Beta Was this translation helpful? Give feedback.
All reactions