Skip to content

Instantly share code, notes, and snippets.

@reponemec
reponemec / OneMovie.js
Last active July 29, 2024 06:49
40. React 3 - Databáze firebase 2 - každý film má svou stránku
import { useEffect, useState } from 'react';
import { useParams } from "react-router-dom";
import { projectFirestore } from '../firebase/config';
import { doc, onSnapshot } from 'firebase/firestore';
const OneMovie = () => {
const { id } = useParams();
const [movie, setMovie] = useState(null);
const [error, setError] = useState(null);