You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there an option for react-firebase to support delta change of QuerySnapshot to cherry-pick and update only the affected documents (added, modified, deleted) in the local copy?
react-firestore version: 1.0.1
node version: v8.16.0
npm (or yarn) version: 1.19.1
Relevant code or config
The current FirebaseCollection.handleOnSnapshotSuccess() is directly updating the state by replacing the data in case of even minor updates of the collection.
What you did:
MUI-Datatable wrapped in FirebaseCollection and data is shared between the components.
What happened:
Upon internal (from within the app) or external change of the data (another app user) the Datatable widget will re-render fully.
Problem description:
In case consumer widget is relying on state of data the component must re-render fully breaking the flow unexpectedly. In my app the FirebaseCollection feeds MUI-Datatable and change of underlying data re-renders the full table and loosing the state of the table.
Suggested solution:
Use docChange() and a different state management approach,
useReducer to delegate state management to consumer,
any other option?
The text was updated successfully, but these errors were encountered:
Is there an option for
react-firebase
to support delta change ofQuerySnapshot
to cherry-pick and update only the affected documents (added, modified, deleted) in the local copy?react-firestore
version: 1.0.1node
version: v8.16.0npm
(oryarn
) version: 1.19.1Relevant code or config
The current
FirebaseCollection.handleOnSnapshotSuccess()
is directly updating the state by replacing thedata
in case of even minor updates of the collection.What you did:
MUI-Datatable wrapped in FirebaseCollection and
data
is shared between the components.What happened:
Upon internal (from within the app) or external change of the data (another app user) the Datatable widget will re-render fully.
Problem description:
In case consumer widget is relying on state of
data
the component must re-render fully breaking the flow unexpectedly. In my app the FirebaseCollection feeds MUI-Datatable and change of underlying data re-renders the full table and loosing the state of the table.Suggested solution:
docChange()
and a different state management approach,useReducer
to delegate state management to consumer,The text was updated successfully, but these errors were encountered: