bem-contrib / bem-redux

Redux for BEM projects
12 stars 3 forks source link

Arrow function to common function #6

Open adinvadim opened 8 years ago

vovieque commented 8 years ago

It seems we can simplify it

var reducer = this.rootReducer.bind(this);
adinvadim commented 8 years ago

Okey. For what there is this variable 'reducer'. Why not

this.store = Redux.createStore(this.rootReducer, initialState);
vovieque commented 8 years ago

In this case it's lost a context. We need to add .bind(this). But it's too complicated for one line.