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:

Nx Adoption Guide: Overview, Examples, And Alternatives

Nx adoption guide: Overview, examples, and alternatives

Let’s explore Nx features, use cases, alternatives, and more to help you assess whether it’s the right tool for your needs.

Andrew Evans
Mar 28, 2024 â‹… 9 min read
Understanding Security In React Native Applications

Understanding security in React Native applications

Explore the various security threats facing React Native mobile applications and how to mitigate them.

Wisdom Ekpotu
Mar 27, 2024 â‹… 10 min read
Warp Adoption Guide: Overview, Examples, And Alternatives

warp adoption guide: Overview, examples, and alternatives

The warp web framework for Rust offers many enticing features. Let’s see when and why you should consider using warp in your projects.

Ukeje Goodness
Mar 26, 2024 â‹… 8 min read
Integrating Next Js And Signalr For Enhanced Real Time Web App Capabilities

Integrating Next.js and SignalR to build real-time web apps

In this tutorial, you’ll learn how to integrate Next.js and SignalR to build an enhanced real-time web application.

Clara Ekekenta
Mar 25, 2024 â‹… 8 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