bug(orderedReducer): deleting an item from nested collection doesn't remove item from ordered reducer
See original GitHub issueDo you want to request a feature or report a bug?
Bug
What is the current behavior?
When calling delete
:
this.props.firestore.delete(`feeds/${this.props.auth.uid}/questions/${this.state.currentQuestion.id}`);
I see the action being fired with the correct payload:
And I see the data
reducer showing null
for the deleted item(s), but the ordered
reducer still contains the deleted item(s):
What is the expected behavior?
Calling delete should remove items from both the data
and ordered
reducers.
Which versions of dependencies, and which browser are affected by this issue? Did this work in previous versions or setups?
"react": "16.3.1",
"react-native": "0.55.3",
"react-native-firebase": "^4.0.4",
"react-redux": "^5.0.7",
"react-redux-firebase": "^2.1.1",
"redux": "^4.0.0",
"redux-firestore": "^0.5.1",
Steps to reproduce and if possible a minimal demo of the problem via codesandbox or similar.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Is this the correct way to delete an item using redux?
No. Never mutate your state. Even though you're returning a new object, you're still polluting the old object, which you never want to...
Read more >The Fastest Way to Remove a Specific Item from an Array in ...
One way to solve this problem is using Array.prototype.indexOf() to find the index of the value, then Array.prototype.splice() to remove that item: ...
Read more >Delet record in a nested gallery - Power Platform Community
I have a nested gallery and would like to delet the selected value. Somehow it doesn't work. Gallery 1: Sort(GroupBy(ZutrittListeAPPGrunddaten; ...
Read more >createEntityAdapter - Redux Toolkit
An entity adapter is a plain JS object (not a class) containing the generated reducer functions, the original provided selectId and sortComparer ...
Read more >Angular NgRx Entity - Complete Practical Guide
We often find ourselves handwriting the exact same reducer logic and selectors ... object have no order associated to them, unlike arrays.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed confirmed - thanks @prescottprue !
@nickw Yup, it also injects the
firestore
prop 😄