3.0.0 • Published 5 years ago

joi-react-native v3.0.0

Weekly downloads
134
License
BSD-3-Clause
Repository
github
Last release
5 years ago

joi-react-native

npm version

Note

  • joi-react-native v3 uses joi 14.3.1 internally and works on react-native >= 0.59.0.

  • joi-react-native v2 uses joi 14.1.0 internally and works on react-native < 0.58.0.

What is the difference between v3 and v2.

  • Because react-native 0.59.0 has new JS Core, we don't need to use polyfills in v3 anymore. For this reason, file size in v3 is significantly smaller (50% smaller) and more performant compared to v2.

Install

npm i --save joi-react-native

Documentation

  • There are no API changes from node Joi. Thus you can use the same documentation from here
https://github.com/hapijs/joi/blob/master/API.md

Works with TypeScript

Use babel plugin to transform all require/import from joi to joi-react-native. By doing this, you can use joi-react-native with type definitions from @types/joi.

  1. Install babel-plugin-rewrite-require
    npm install --save-dev babel-plugin-rewrite-require
  2. In .babelrc, add the following:
    "plugins": [
      ["rewrite-require", {
        aliases: {
          joi: 'joi-react-native',
        }
      }]
    ]
  3. That's it. In any files that uses joi, you must require/import from joi (not joi-react-native). Babel will transform to joi-react-native for you
3.0.0

5 years ago

3.0.0-rc.1

5 years ago

2.0.1

5 years ago

2.0.1-rc2

5 years ago

2.0.1-rc1

5 years ago

2.0.0

5 years ago

2.0.0-rc3

5 years ago

2.0.0-rc2

5 years ago

2.0.0-rc1

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago