Joi: can we use joi on react apps for browsers ?

Created on 21 Dec 2020  路  6Comments  路  Source: sideway/joi

Support plan

  • is this issue currently blocking your project? (yes/no):no
  • is this issue affecting a production system? (yes/no):no
support

All 6 comments

Yes you can

@Kannndev
everyone there on forums ( stack overflow) says we have to use joi-browser , i m not sure why joi-browser exist then?

@endurance21 I am not sure why they suggest that. Can you share the links here. But I have been using Joi for form validation in couple of react apps haven't faces any issue so far.

@endurance21
I'm also using it without issue. There's also an existing package specifically for react here. I'm not using it myself bc I don't like wrapping my components. Also, I'm working on a pattern using react hooks that may become a library at some point (very early stages), find it here if you're interested.

Thank you guys for the clarification

Joi comes with a browser build. joi-browser existed because Joi didn't have a browser bundle back then.

Was this page helpful?
0 / 5 - 0 ratings