Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // action-creators.js
- import { CHANGE_ACTIVE_SECTION } from '../constants/action-types';
- export function changeActiveSection(sectionIndex) {
- return {
- type: CHANGE_ACTIVE_SECTION,
- payload: {
- sectionIndex
- }
- }
- }
- // When you want to use it
- store.dispatch(changeActiveSection(index))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement