Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
stateNumber: number;
stateRegExp: RegExp;
stateString: string;
stateUndefined: undefined;
stateUnion: string | null;
actionImp: Action;
actionNoPayload: Action;
thunkImp: Thunk;
reducerImp: Reducer;
nested: {
actionImp: Action;
thunkImp: Thunk;
};
}
let dispatch = useStoreDispatch();
dispatch({ type: 'FOO' });
let useStoreResult = useStoreState((state: State) => state.stateNumber);
useStoreResult + 1;
let useActionResult = useStoreActions(
(actions: Actions) => actions.actionImp,
);
useActionResult(1);
let store = useStore();
store.getState().stateString + 'world';
const typedHooks = createTypedHooks();
useStoreResult = typedHooks.useStoreState(state => state.stateNumber);
useStoreResult + 1;