Created
June 6, 2019 21:39
-
-
Save kobzarvs/b429046f0415ac1f6bdbbfb0d32a9ff7 to your computer and use it in GitHub Desktop.
effector -> redux devtool
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createStore as createReduxStore } from 'redux' | |
import { devToolsEnhancer } from 'redux-devtools-extension' | |
const redux = createReduxStore((state, { payload }) => payload, devToolsEnhancer()) | |
export function useReduxDevTool(store) { | |
store.watch(payload => redux.dispatch({ type: 'CHANGE', payload })) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment