Closed sebadom closed 4 years ago
useFirebaseConnect
should recieve an array argument instead of a string or null
, so you could do:
useFirebaseConnect(editMode ? [`courses/${match.params.id}`] : []);
Mmm I see... let me try that out. On the other hand I believe the documentation is wrong perhaps
It says it supports array, string, object, function or null if we don't want to sync. And the example is using a string also
Let me set things up using just an array and I will come back. Thanks!
I think its working fine with empty array! It might have been me, but I was confused by the documentation Thanks!
Do you want to request a feature or report a bug? BUG
The documentation says that useFirebaseConnect can be potentially used passing null as an argument, therefore NO sync is done. First issue: null is not supported when using typescript, undefined is. Second issue: using this approach makes the component to throw an error when unwatches the event
What is the current behavior?
Navigating away from the route containing a component with this piece:
Throws this:
Uncaught TypeError: Cannot read property 'forEach' of undefined,
It is exploting at this code
Here you can reproduce it. Go from HOME to TODOS, then click HOME again. see the error