Skip to content

Commit

Permalink
feat(docs): add example for react projects
Browse files Browse the repository at this point in the history
  • Loading branch information
ahme-dev authored Jan 8, 2024
1 parent 842b8f8 commit 7006a64
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion docs/tools/devtools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Enhance your development experience with the UI based Jotai DevTool.

Use Jotai babel plugins for optimal debugging experience. Find the complete guide on the [babel](../tools/babel) page and/or [swc](../tools/swc) page.

Eg.
Example:

```ts
{
Expand All @@ -54,6 +54,23 @@ Eg.
}
```

Example for Vite + React project:


```ts
// vite.config.ts

export default defineConfig({
plugins: [
react({
babel: {
plugins: ["jotai/babel/plugin-debug-label", "jotai/babel/plugin-react-refresh"],
},
}),
],
});
```

### Next JS setup

_You may skip this section if you're not using [Next.js](https://nextjs.org)._
Expand Down

0 comments on commit 7006a64

Please sign in to comment.