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,
}
}
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,
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us