Answers for "how to get state from store in action redux"

1

how to get state from store in action redux

import store from '../store';

export const SOME_ACTION = 'SOME_ACTION';
export function someAction() {
  let items = store.getState().items;
  return {
    type: SOME_ACTION,
    items: items,
  }
}
Posted by: Guest on September-11-2021

Code answers related to "how to get state from store in action redux"

Code answers related to "Javascript"

Browse Popular Code Answers by Language