prescottprue / react-redux-firebase

Redux bindings for Firebase. Includes React Hooks and Higher Order Components.
https://react-redux-firebase.com
MIT License
2.55k stars 559 forks source link

StoreAs behaves differently than normal query (without StoreAs)? #1087

Open shethhriday29 opened 3 years ago

shethhriday29 commented 3 years ago

This is for the Firebase realtime database, btw.

Does using StoreAs in a firebaseConnect() query make the data load differently than just doing a normal query?

For example:

let's say I query '/comments' and then also ( '/comments' but storeAs: '/comments'), the data will load faster the latter way. Specifically, on the initial isLoaded for the former, only old data (previously in the Redux store) will be there, but in the former, the initial isLoaded will include all the new data as well.

Also, componentDidUpdate happens faster with the StoreAs.

Thank you!