Meta-Reducers in ngrx/store

You don’t really need middleware

The ngrx team decided that we don’t need middleware anymore, in most cases, we can use meta-reducers to achieve the same effects.

What is a meta-reducer?

A meta-reducer is just a fancy name for higher order reducer (i.e., function).

Because a reducer is just a function, we can implement higher order reducer — “meta reducer.”

higher order function is a function that may receive a function as parameter or even return a function.

In simple words —

Take a reducer, do what you need and return a new reducer.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s