Search code examples
reactjsfirebasegoogle-cloud-firestore

Connect to firebase DB


im trying to developt a simple Website in React to know the games that are launched in a month, for that i want to store that data on a firebase db(handmade) and read it.

But in the first trys, im not getting connection.

I have this to try Firebase Data but im getting: Error console

First i tried throught a thunk, that im dont know how to make it work, and now im trying directly through the component "Game.jsx". Im a bit lost and searching isnt giving a lot of info

This is the project, https://github.com/saulOMgit/CalendarioVideojuegos, any clues?


Solution

  • First go to your firestore and change rules

    enter image description here

     rules_version = '2';
     service cloud.firestore {
      match /databases/{database}/documents {
        match /{document=**} {
          allow read, write;
        }
      }
    }