2021-11-10
2483
#firebase#react#redux
Yusuff Faruq
17529
Nov 10, 2021 â‹… 8 min read

Getting started with react-redux-firebase

Yusuff Faruq Frontend web developer and anime lover from Nigeria.

Recent posts:

Rxjs Adoption Guide: Overview, Examples, And Alternatives

RxJS adoption guide: Overview, examples, and alternatives

Get to know RxJS features, benefits, and more to help you understand what it is, how it works, and why you should use it.

Emmanuel Odioko
Jul 26, 2024 â‹… 13 min read
Decoupling Monoliths Into Microservices With Feature Flags

Decoupling monoliths into microservices with feature flags

Explore how to effectively break down a monolithic application into microservices using feature flags and Flagsmith.

Kayode Adeniyi
Jul 25, 2024 â‹… 10 min read
Lots of multi-colored blue and purplish rectangles.

Animating dialog and popover elements with CSS @starting-style

Native dialog and popover elements have their own well-defined roles in modern-day frontend web development. Dialog elements are known to […]

Rahul Chhodde
Jul 24, 2024 â‹… 10 min read
Using Llama Index To Add Personal Data To Large Language Models

Using LlamaIndex to add personal data to LLMs

LlamaIndex provides tools for ingesting, processing, and implementing complex query workflows that combine data access with LLM prompting.

Ukeje Goodness
Jul 23, 2024 â‹… 5 min read
View all posts

5 Replies to "Getting started with react-redux-firebase"

  1. how does your live app work? When i press the button it authenticated me but nothing happened

  2. Thanks for the great starter. Noticed a small bug. Because you are moving `isDone` to local state (`isTodoItemDone`) it is not updated/rerendered when `firestore` receives a change from the `todos` listener so when you use that to set the `input` to `checked`, it doesn’t update the UI when it is marked complete in a different window/app instance.

    I’ve fixed it by updating the state in an `effect`:

    “`
    const [isTodoItemDone, setTodoItemDone] = useState(isDone);
    useEffect(() => {
    setTodoItemDone(isDone);
    }, [isDone]);
    “`

  3. If you look at the console you can see that google authentication is not set up properly. In the author’s account he needs to allow registration from this domain.

  4. 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

  5. there’s a warning for this..

    const auth = useSelector(state => state.firebase.auth);

    as it says…
    A hook to access the redux store’s state. This hook takes a selector function as an argument. The selector is called with the store state.

    This hook takes an optional equality comparison function as the second parameter that allows you to customize the way the selected state is compared to determine whether the component needs to be re-rendered.

Leave a Reply