Skip to content

Commit 05c0d5b

Browse files
committed
fix wrong inline documentation for useSelectors hook
1 parent 0e41eae commit 05c0d5b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/hooks/useSelector.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ const refEquality = (a, b) => a === b
2020
* A hook to access the redux store's state. This hook takes a selector function
2121
* as an argument. The selector is called with the store state.
2222
*
23-
* This hook takes a dependencies array as an optional second argument,
24-
* which when passed ensures referential stability of the selector (this is primarily
25-
* useful if you provide a selector that memoizes values).
23+
* This hook takes an optional equality comparison function as the second parameter
24+
* that allows you to customize the way the selected state is compared to determine
25+
* whether the component needs to be re-rendered.
2626
*
2727
* @param {Function} selector the selector function
2828
* @param {Function} equalityFn the function that will be used to determine equality
@@ -33,7 +33,6 @@ const refEquality = (a, b) => a === b
3333
*
3434
* import React from 'react'
3535
* import { useSelector } from 'react-redux'
36-
* import { RootState } from './store'
3736
*
3837
* export const CounterComponent = () => {
3938
* const counter = useSelector(state => state.counter)

0 commit comments

Comments
 (0)