Remix.run Logo
ants_everywhere 15 hours ago

Yes this is just ad hoc runtime type checking

mewpmewp2 15 hours ago | parent [-]

Alternative -> could just use something like Zod or have native stdlib Zod like type of thing to improve a lot on this type of edge case handling. Although if performance is key, then might question how much this constant parsing and validation would add on top, but in 99% cases probably wouldn't matter.