Property of fragment change not tracked by redux
On a pubsweet component, I'm tracking a single fragment through mapStateToProps
.
When I run the updateFragment
action on this fragment and change one of its properties, this does not trigger a re-render, even though the fragment has now changed.
This works (very hackily) if in mapStateToProps
I track the property explicitly and return it separately from the fragment.
From what I could gather online, this is most likely an issue with the updateOne
reducer mutating the original object instead of returning a new one.