Closed mpeyper closed 3 years ago
This has been published as version 3.1.1-alpha.0
(for all packages) for anyone that want's to try it out. Please let me know if you have any issues.
Hey @mpeyper,
Just tested 3.1.1-alpha.0 with React 16.13.1.
So far so good, I'm seeing no difference at all in our application which heavily rely on dynostore/subspaces. Warning from react is gone.
I will keep pushing the tests but at this point I'm pretty confident I won't find any new/modified behavior. We will probably commit to use you alpha release until it makes its way into an official release.
Thank you very much for your efforts
Thanks for the feedback @Ethorsen. Assuming this is still working fine for you (please let me know otherwise), I'll get this into a release soon.
This has (finally) been released in v3.1.1
it seems like this fix is causing regressions when using SSR: https://github.com/ioof-holdings/redux-dynostore/issues/473
Moved the store and component enhancement of the "dynamic target" chain into
useEffect
ofdynamic
, preventing theattachReducer
call (and any other enhancers that trigger a store update`) from updating the store in the main render path.This change has an assumption that is is ok to render
null
for a single render until the store has been updated. Once the effect has triggered, the enhanced component will be created and set into state where it can be safely rendered in the subsequent renders. I think this is ok, but it is a change from the existing functionality, although it may improve a previously raised issues around concurrent mode and render tearing (where some of the rendering uses a particular instance of state and the another part uses a different instance of state, potentially creating inconsistent output).I'm not sure if this should be a breaking change, in case anyone is relying on this behaviour, a minor change, because we may have introduced a new feature to prevent tearing, or a minor change, because we're fixing a warning about a potential bugs.
I'm leaning towards a major version, but I'm also open to being convinced it only a minor or patch version.