Skip to content

Commit

Permalink
fix(types): accept undefined equalityFn for the deprecated useStore
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi committed Aug 3, 2023
1 parent 2778e71 commit a4e2923
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function useStore<S extends WithReact<StoreApi<unknown>>, U>(
export function useStore<S extends WithReact<StoreApi<unknown>>, U>(
api: S,
selector: (state: ExtractState<S>) => U,
equalityFn: (a: U, b: U) => boolean
equalityFn: ((a: U, b: U) => boolean) | undefined
): U

export function useStore<TState, StateSlice>(
Expand Down

0 comments on commit a4e2923

Please sign in to comment.