Closed tuntisz closed 6 years ago
@KELiON Thanks for your work on redux-async-initial-state. It's been a big part of a project I'm working on.
Let me know your thoughts on maintaining backwards compatibility versus dropping a major release. I'd be happy to update this to pass just the one parameter store.getState
cc @jdolle
@KELiON following up here
@tuntisz sorry for so long pause! I'd better do better API rather than backward compatibility and I think passing just one functional param is better. Can you please update your code and readme so I can release a new major version?
@tuntisz have you had any word on the status of this?
@conor909 @KELiON I've updated the PR with the requested API updated.
@KELiON can we get this released?
Passing
getState
as a function fixes a race condition that can occur if actions are dispatched betweenredux-async-initial-state-/STATE_LOADING_START
andredux-async-initial-state-/STATE_LOADING_DONE
.By passing
getState
as the second parameter to theload
function, backwards compatibility is maintained.