From 00d90f49de6ab8d2c143a2ededd23711cd0db1d3 Mon Sep 17 00:00:00 2001 From: Haishan Date: Thu, 20 Dec 2018 23:35:17 +0800 Subject: chore: rename useComponentState to useStoreState --- src/misc/store.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/misc') diff --git a/src/misc/store.js b/src/misc/store.js index 6f1f8aa..c44396f 100644 --- a/src/misc/store.js +++ b/src/misc/store.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import { bindActionCreators } from 'redux'; import shallowEqual from './shallowEqual'; -export const StoreContext = createContext(null); +const StoreContext = createContext(null); export function Provider({ store, children }) { return ( @@ -28,7 +28,7 @@ export function useActions(actions) { return bindActionCreators(a, dispatch); } -export function useComponentState(selector) { +export function useStoreState(selector) { const store = useStore(); const initialMappedState = selector(store.getState()); const [compState, setCompState] = useState(initialMappedState); -- cgit v1.3.1