Skip to content

Commit

Permalink
docs: run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
John Gilliland authored and John Gilliland committed Aug 21, 2023
1 parent 4b2f05b commit 335360b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
5 changes: 2 additions & 3 deletions docs/guides/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,8 @@ In the next steps we are going to setup our Vitest environment in order to mock
import * as zustand from 'zustand'
import { act } from '@testing-library/react'

const { create: actualCreate } = await vi.importActual<typeof zustand>(
'zustand'
)
const { create: actualCreate } =
await vi.importActual<typeof zustand>('zustand')

// a variable to hold reset functions for all stores declared in the app
export const storeResetFns = new Set<() => void>()
Expand Down
14 changes: 8 additions & 6 deletions docs/guides/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,13 @@ interface BearState {

const useBearStore = create<BearState>()(
devtools(
persist((set) => ({
bears: 0,
increase: (by) => set((state) => ({ bears: state.bears + by })),
}),
{ name: "required name option" })
persist(
(set) => ({
bears: 0,
increase: (by) => set((state) => ({ bears: state.bears + by })),
}),
{ name: 'required name option' }
)
)
)
```
Expand All @@ -191,7 +193,7 @@ Just make sure you are using them immediately inside `create` so as to make the
import { create } from 'zustand'
import { devtools, persist } from 'zustand/middleware'

const myMiddlewares = (f) => devtools(persist(f, {name: "options name"}))
const myMiddlewares = (f) => devtools(persist(f, { name: 'options name' }))

interface BearState {
bears: number
Expand Down

0 comments on commit 335360b

Please sign in to comment.