I was following along this tutorial to connect Firebase using react hooks. I followed everything but I am having a problem interacting with the real-time database on my project. For example, when I tried to insert data into the database, it doesn't make any changes it just shows null; I tried to see if it was other problems, tried it with different accounts, creating new projects, but nothing seems to work.
My App.js looks like this:
import React from "react"
import "./App.css"
import firebase from "./firebase"
function App() {
firebase
.firestore()
.collection("notes")
.add({
title: "Working",
body: "This is to check the Integration is working",
});
return (
<div className="App">
<h2>Note Taking App</h2>
<p>using React Hooks and Firebase</p>
<h3>Notes : </h3>
</div>
)
}
export default App
I checked the rules for the realtime database on firebase, and it shows:
{
"rules": {
".read": "now < 1610427600000", // 2021-1-12
".write": "now < 1610427600000", // 2021-1-12
}
}
XHRHttpRequests, it shows something is failing on the GET request.
It is a newly created project and I only changed the App.js and added firebase.js that looks exactly like the one in the guide.

add()for errors. It could be failing and you'd never know. Also, the security rules you have here are for Realtime Database but your code is writing to Firestore. They are completely different database systems.add()to Realtime Database version and it worked