Open waqasxh opened 2 years ago
Can you send a sample project from here? https://codesandbox.io/
I found and fixed the issue, in RUG.js constructor, initialState.reverse() is being called that is trying to mutate the state
this.state = { images: initialState .reverse() .map((item) => { return this.create({ done: true, ...item, }); }) .reverse(),
renderComponent: !ssrSupport,
};
@m-inan It seem quite unintuitive to reverse the array like that. I'm not sure what you were trying to achieve, but array.map
already returns a new array, in case you were trying to keep it pure. As a result, when adding a photo, it's appended as if the layout is RTL. It's expected to have photos append from LTR by default. @waqasxh Did you try setting the inOrder
prop to true
?
I my functional component I am setting InitialState via state variable that is fetched from API call and passed in from Redux, I am getting "A state mutation was detected between dispatches but I haven't mutated state" error.