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:

Building a Full-Featured Laravel Admin Dashboard with Filament

Building a full-featured Laravel admin dashboard with Filament

Build scalable admin dashboards with Filament and Laravel using Form Builder, Notifications, and Actions for clean, interactive panels.

Kayode Adeniyi
Dec 20, 2024 â‹… 5 min read
Working With URLs In JavaScript

Working with URLs in JavaScript

Break down the parts of a URL and explore APIs for working with them in JavaScript, parsing them, building query strings, checking their validity, etc.

Joe Attardi
Dec 19, 2024 â‹… 6 min read
Lazy Loading Vs. Eager Loading

Lazy loading vs. Eager loading

In this guide, explore lazy loading and error loading as two techniques for fetching data in React apps.

Njong Emy
Dec 18, 2024 â‹… 5 min read
Deno logo over an orange background

How to migrate your Node.js app to Deno 2.0

Deno is a popular JavaScript runtime, and it recently launched version 2.0 with several new features, bug fixes, and improvements […]

Yashodhan Joshi
Dec 17, 2024 â‹… 7 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