Last active
August 14, 2019 05:58
-
-
Save JurajMlich/b26629d4b61690960a78eb14afe4a49d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {ActionReducer, ActionReducerMap, MetaReducer} from '@ngrx/store'; | |
import {State} from './root.state'; | |
import {environment} from '../../environments/environment'; | |
export const rootReducers: ActionReducerMap<State> = { | |
// YOUR REDUCERS HERE | |
}; | |
export const rootMetaReducers: MetaReducer<State>[] = []; | |
if (environment.hmr) { | |
rootMetaReducers.push((reducer: ActionReducer<any>): ActionReducer<any> => { | |
return function (state: any, action: any) { | |
if (action.type === 'SET_ROOT_STATE') { | |
return action.payload; | |
} | |
return reducer(state, action); | |
}; | |
}); | |
} |
@Prinsn will include the whole file, give me a few hours
No rush, just a crique.
…On Tue, Aug 13, 2019, 11:46 PM Juraj Mlich ***@***.***> wrote:
@Prinsn <https://github.com/Prinsn> will include the whole file, give me
a few hours
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://gist.github.com/b26629d4b61690960a78eb14afe4a49d?email_source=notifications&email_token=AAYR7G75ZFOJRB2WII4BQEDQEN5Y5A5CNFSM4ILN7LK2YY3PNVWWK3TUL52HS4DFVNDWS43UINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAFW7OY#gistcomment-2997996>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAYR7G2IFG7BWSAWPTXERA3QEN5Y5ANCNFSM4ILN7LKQ>
.
Updated ;)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm assuming you've truncated this, as
State
is defined in a basic reducer.You shouldn't exclude code if you're going to suggest that this is the entire file.