Files
frontend-app-gradebook/src/data/redux/hooks/utils.js
Ben Warzeski e1c8b01531 refactor: update GradebookFilter components to function component (#308)
* feat: update assignmetn filter component to function component

* chore: redux hook tests

* fix: tests

* chore: update more components to hooks

* chore: moar componentsAssignment

* chore: moar component (StudentGroupsFilter)

* chore: gradebook filter component update

* chore: fix a few places of typo

* chore: use global store for dispatch to avoid out of component

* chore: compromise the test string for local machine

* chore: linting

* test: add more tests for coverage 100%

* chore: linting

* chore: add coverage badge on readme

* chore: bump package version

---------

Co-authored-by: Leangseu Kim <lkim@edx.org>
2023-03-06 11:02:30 -05:00

10 lines
289 B
JavaScript

import { StrictDict } from 'utils';
// useDispatch hook wouldn't work here because it is out of scope of the component
import store from 'data/store';
export const actionHook = (action) => () => (...args) => store.dispatch(action(...args));
export default StrictDict({
actionHook,
});