Getting Started with Create React App or Vite React
Installation
In your Create React App or Vite React project, install Kitchen by running either of the following:
npm i @tonightpass/kitchen --save
Provider Setup
After installing Kitchen, you need to set up the KitchenProvider
at the root
of your application. This can be either in your App.jsx
or App.tsx
file.
// App.jsx
import { KitchenProvider } from "@tonightpass/kitchen";
export default function App({ Component, pageProps }) {
return (
<KitchenProvider>
<TheRestOfYourApplication />
</KitchenProvider>
);
}
Deploy your own
Deploy the example using Vercel (opens in a new tab) or preview live with StackBlitz (opens in a new tab) or CodeSandbox (opens in a new tab).
In addition, here is a complete project example (opens in a new tab) using Kitchen with Next.js.