question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug(orderedReducer): deleting an item from nested collection doesn't remove item from ordered reducer

See original GitHub issue

Do 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: screen shot 2018-05-12 at 2 03 55 pm

And I see the data reducer showing null for the deleted item(s), but the ordered reducer still contains the deleted item(s): screen shot 2018-05-12 at 2 03 06 pm

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:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nickwcommented, May 15, 2018

Fixed confirmed - thanks @prescottprue !

0reactions
prescottpruecommented, May 15, 2018

@nickw Yup, it also injects the firestore prop 😄

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found