Installation
info
Zodios packages can be installed using your preferred package manager.
We only show npm and yarn as they are the most popular.
Frontend installation
- npm
- Yarn
npm install @zodios/core axios zod
yarn add @zodios/core axios zod
With React
if you want to use the react hooks, you need to install the following packages:
- npm
- Yarn
npm install @tanstack/react-query @zodios/core @zodios/react axios react react-dom zod
yarn add @tanstack/react-query @zodios/core @zodios/react axios react react-dom zod
With Solid
if you want to use the solid hooks, you need to install the following packages:
- npm
- Yarn
npm install @tanstack/solid-query @zodios/core @zodios/solid axios solid-js zod
yarn add @tanstack/solid-query @zodios/core @zodios/solid axios solid-js zod
Install type definitions
install those even in javascript projects.
- npm
- Yarn
// if you use react
npm install --dev @types/react @types/react-dom
// if you use react
yarn add --dev @types/react @types/react-dom
Backend installation
With Express
- npm
- Yarn
npm install @zodios/core @zodios/express express zod axios
yarn add @zodios/core @zodios/express express zod axios
optional packages for openapi generation:
- npm
- Yarn
npm install @zodios/openapi swagger-ui-express
yarn add @zodios/openapi swagger-ui-express
With NextJS
- npm
- Yarn
npm install @zodios/core @zodios/express next zod axios react react-dom
yarn add @zodios/core @zodios/express next zod axios react react-dom
Install type definitions
install those even in javascript projects
- npm
- Yarn
// if you use express
npm install --dev @types/express
// or with nextjs
npm install --dev @types/express @types/react @types/react-dom
// if you use express
yarn add --dev @types/express
// or with nextjs
yarn add --dev @types/express @types/react @types/react-dom