Skip to content

Commit

Permalink
import hooks from jotai-devtools/utils instead of jotai-devtools (#2505)
Browse files Browse the repository at this point in the history
Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
  • Loading branch information
do7be and dai-shi authored Apr 13, 2024
1 parent d1b7411 commit c60092f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/tools/devtools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ It will catch all atoms that are accessible from the place the hook is located.
### Example

```jsx
import { useAtomsDebugValue } from 'jotai-devtools'
import { useAtomsDebugValue } from 'jotai-devtools/utils'
const textAtom = atom('hello')
textAtom.debugLabel = 'textAtom'
Expand Down Expand Up @@ -226,7 +226,7 @@ The `useAtomDevtools` hook accepts a generic type parameter (mirroring the type
### Example

```ts
import { useAtomDevtools } from 'jotai-devtools'
import { useAtomDevtools } from 'jotai-devtools/utils'
// The interface for the type stored in the atom.
export interface Task {
Expand Down Expand Up @@ -322,7 +322,7 @@ Be careful using this hook because it will cause the component to re-render for

```jsx
import { Provider } from 'jotai'
import { useAtomsSnapshot } from 'jotai-devtools'
import { useAtomsSnapshot } from 'jotai-devtools/utils'
const RegisteredAtoms = () => {
const atoms = useAtomsSnapshot()
Expand Down Expand Up @@ -365,7 +365,7 @@ This hook is primarily meant for debugging and devtools use cases.

```jsx
import { Provider } from 'jotai'
import { useAtomsSnapshot, useGotoAtomsSnapshot } from 'jotai-devtools'
import { useAtomsSnapshot, useGotoAtomsSnapshot } from 'jotai-devtools/utils'
const petAtom = atom('cat')
const colorAtom = atom('blue')
Expand Down

0 comments on commit c60092f

Please sign in to comment.