mirror of
https://github.com/streamich/react-use.git
synced 2026-01-25 14:17:16 +00:00
fix: fix TypeScript error
This commit is contained in:
parent
6ba2d93700
commit
72e3036b15
@ -11,7 +11,7 @@ function composeMiddleware(chain) {
|
||||
const createReducer = (...middlewares) => (reducer, initialState, initializer = value => value) => {
|
||||
const ref = useRef(initializer(initialState))
|
||||
const [, setState] = useState(ref.current)
|
||||
let middlewareDispatch = () => {
|
||||
let middlewareDispatch = (_ = {}) => {
|
||||
throw new Error(
|
||||
'Dispatching while constructing your middleware is not allowed. ' +
|
||||
'Other middleware would not be applied to this dispatch.'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user