style: don't shadow variable

This commit is contained in:
Vadim Dalecky 2019-06-02 07:28:09 +02:00 committed by GitHub
parent 72e3036b15
commit 17036105ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,6 @@ import logger from 'redux-logger';
import thunk from 'redux-thunk';
import { createReducer } from '..';
// import ShowDocs from './util/ShowDocs';
const useThunkReducer = createReducer(thunk, logger);
@ -29,11 +28,11 @@ function reducer(state, action) {
const Demo = ({ initialCount = 1 }) => {
// Action creator to increment count, wait a second and then reset
const addAndReset = React.useCallback(() => {
return dispatch => {
dispatch({ type: 'increment' });
return dispatch2 => {
dispatch2({ type: 'increment' });
setTimeout(() => {
dispatch({ type: 'reset', payload: initialCount });
dispatch2({ type: 'reset', payload: initialCount });
}, 1000);
};
}, [initialCount]);