Query data from Firebase Firestore and Reactjs | Firebase and React Tutorial Series

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ต.ค. 2024

ความคิดเห็น • 14

  • @shaheensiddiqui-5432
    @shaheensiddiqui-5432 ปีที่แล้ว +1

    Thanks piyush for making this video

    • @piyushgargdev
      @piyushgargdev  ปีที่แล้ว

      It's my pleasure

    • @hacker57
      @hacker57 ปีที่แล้ว

      If don't mind plz correct name 🥺

  • @mukulkumar9664
    @mukulkumar9664 2 ปีที่แล้ว +1

    🔥🔥🔥

  • @nabinsaud4688
    @nabinsaud4688 2 ปีที่แล้ว +4

    I am expecting full stack ecommerce app using react and Firebase

  • @NandiOnTheWheels
    @NandiOnTheWheels ปีที่แล้ว +1

    Hi bro, when i try to pass a a props books.data() its showing error i spent 2hr but still showing errors :(

    • @piyushgargdev
      @piyushgargdev  ปีที่แล้ว

      What is the error?

    • @NandiOnTheWheels
      @NandiOnTheWheels ปีที่แล้ว

      @@piyushgargdev
      HOME JSX
      import React, { useEffect, useState } from "react";
      import { useFirebase } from "../context/Firebase";
      import CardList from "../components/Card"
      const Home = () => {
      const firebase = useFirebase();
      const [books, setBooks] = useState("");
      useEffect(() => {
      firebase.listAllBooks().then((books) => setBooks(books.docs));
      },[]);
      return (


      {

      books.map((book)=>(

      ))
      }

      );
      };
      export default Home;

    • @NandiOnTheWheels
      @NandiOnTheWheels ปีที่แล้ว

      @@piyushgargdev
      card.jsx
      import React from 'react';
      import Button from 'react-bootstrap/Button';
      import Card from 'react-bootstrap/Card';
      const CardList=(props)=> {
      console.log("props",props)


      return (





      {props.name}

      Book has a title {props.name} this book sold by {props.username}

      Go somewhere



      );
      }
      export default CardList;

    • @NandiOnTheWheels
      @NandiOnTheWheels ปีที่แล้ว

      @@piyushgargdev
      ERRORS:-
      react-dom.development.js:18687 The above error occurred in the component:
      at Home (localhost:3000/static/js/bundle.js:687:82)
      at RenderedRoute (localhost:3000/static/js/bundle.js:98822:5)
      at Routes (localhost:3000/static/js/bundle.js:99259:5)
      at div
      at App (localhost:3000/static/js/bundle.js:49:74)
      at FirebaseProvider (localhost:3000/static/js/bundle.js:471:74)
      at Router (localhost:3000/static/js/bundle.js:99197:15)
      at BrowserRouter (localhost:3000/static/js/bundle.js:97514:5)
      Consider adding an error boundary to your tree to customize error handling behavior.
      Visit reactjs.org/link/error-boundaries to learn more about error boundaries.

    • @piyushgargdev
      @piyushgargdev  ปีที่แล้ว +3

      @@NandiOnTheWheels In Home.jsx update this -> ```const [books, setBooks] = useState([]);```
      Changed "" to [] in hook initial value

  • @Tareq0025
    @Tareq0025 ปีที่แล้ว

    Boss❤❤❤