Open abnersouza opened 3 years ago
Honestly, now a days, I haven't been using redux to store data for new apps I create using Firebase. The Firebase SDK itself handles de-duping listeners, so state will propagate to all of your components straight from there
Planning on writing up a medium article or something to clarify this for others, but great question
Here is the above mentioned medium article
Added a note to react-redux-firebase, and am planning to add one to redux-firestore as well.
@abnersouza @prescottprue You should not use this lib if you care about SEO and the core vitals of your website. This library's bundle size, combined with react-redux-firebase
plus firebase/firestore
adds about 140kb to your common bundle size. And there's no way to lazy-load the firestore lib. But if you're a newbie building a dashboard or a private web app, this lib gets you going pretty quickly. The documentation is good and it's stable.
@prescottprue Your Medium article is great. Thanks for writing that.
Guys,
I’m new to redux world, also firestore. I am building an application and we are already using the react-redux-firebase, an i get the point of using it since i want access auth in all parts of my app.
But when comes to the other collections i don’t see the reason to keep all of them inside my store, as example i have a collection companies, and i have a specific page to look a them, edit and add new.
I don’t need to keep them available in any other component, to be access from redux. So my question is should i use redux-firestore to get, add and update that collection? Or in this case should i use the normal get() add() from the firestore api?
Thanks