We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do you have implementation of electron-redux for ngrx?
I try to implement this middleware for ngrx metaReducers, but i have some problems with it.
const isLocalAction = ({ meta }: Action) => (meta && meta.scope && meta.scope === 'local'); const isServiceAction = ({ type }: Action) => type.substr(0, 5) === '@ngrx'; const isFSA = (action: Action) => Object.keys(action).every((key) => [ 'type', 'payload', 'error', 'meta', ].indexOf(key) > -1); export function electronRedux(reducer: ActionReducer<any>): ActionReducer<any> { return function(state, action: Action) { if (isServiceAction(action)) { return reducer(state, action); } if (!isFSA(action)) { return reducer(state, action); } if (isLocalAction(action)) { return reducer(state, action); } electron.ipcRenderer.send('redux-action', action); return state; }; }
metaReducer should always return the store. I can`t prevent action like in redux middlewares.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Do you have implementation of electron-redux for ngrx?
I try to implement this middleware for ngrx metaReducers, but i have some problems with it.
metaReducer should always return the store. I can`t prevent action like in redux middlewares.
The text was updated successfully, but these errors were encountered: