Changing state ought to be considered as async action and then other operations (i.e. fetching) have to wait for it in order to omit race condition. Previously fetching was probably conflicting with displaying feedback.
Changes
https://github.com/neoziro/recompact/issues/59
Following this discussion figured out that lifecycle methods' hook is a solution for this case since compact does not provide any mechanism for registering proper callback. There was need to make fetch only after state's change.
Also, change fading logic and make it more smooth.
Motivation
Changing state ought to be considered as async action and then other operations (i.e. fetching) have to wait for it in order to omit race condition. Previously fetching was probably conflicting with displaying feedback.
Changes
https://github.com/neoziro/recompact/issues/59 Following this discussion figured out that lifecycle methods' hook is a solution for this case since
compact
does not provide any mechanism for registering proper callback. There was need to make fetch only after state's change.Also, change fading logic and make it more smooth.