Skip to content

Commit

Permalink
docs(immer): fix wrong typing
Browse files Browse the repository at this point in the history
  • Loading branch information
wherehows committed Dec 11, 2023
1 parent fa04478 commit bb15436
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/integrations/immer-middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ type Actions = {
decrement: (qty: number) => void
}

export const useCountStore = create<State & Actions>()(
immer((set) => ({
export const useCountStore = create()(
immer<State & Actions>((set) => ({
count: 0,
increment: (qty: number) =>
set((state) => {
Expand Down Expand Up @@ -71,8 +71,8 @@ type Actions = {
toggleTodo: (todoId: string) => void
}

export const useTodoStore = create<State & Actions>()(
immer((set) => ({
export const useTodoStore = create()(
immer<State & Actions>((set) => ({
todos: {
'82471c5f-4207-4b1d-abcb-b98547e01a3e': {
id: '82471c5f-4207-4b1d-abcb-b98547e01a3e',
Expand Down

0 comments on commit bb15436

Please sign in to comment.