redux-immutable icon indicating copy to clipboard operation
redux-immutable copied to clipboard

Trying to make it work with redux-auth

Open OriaLogic opened this issue 7 years ago • 0 comments

Hi,

This is not an issue but rather a question. I am trying to make redux-auth work with redux-immutable. There is an issue because redux-auth tries to access the "auth" part of the state through state.auth, which of course does not work.

I would like to define a getter allowing access to auth via state.auth every time the state changes by doing:

Object.defineProperty(
  store.getState(), 
  'auth', { 
      get: function() { return this.get('auth'); 
  } 
});

That would fix this known issue.

Could you help me with that by telling me if it is possible or not? I guess it is not a great solution but I think it would help many people.

Thanks in advance, Cheers

OriaLogic avatar Apr 18 '17 13:04 OriaLogic