Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

157
Views
var existData = props.quotes.find((obj) => obj.id === params.id); encontrar es indefinido

var existData = props.quotes.find((obj) => obj.id === params.id); encontrar es indefinido

Obtener datos de firebase, mostrar datos en la lista de cotizaciones y la página de cotizaciones simples,

usando accesorios,

Usando reaccionar-dom

 const AllQuotes = (props) => { const [movies, setMovies] = useState([]); async function movieData() { try { const response = await fetch( "https://react-post-api-default-rtdb.firebaseio.com/NewQuotes.json" ); const data = await response.json(); const loadedData = []; for (const key in data) { loadedData.push({ id: key, // id : Math.random(0,1).toString(), author: data[key].author, quote: data[key].quote, }); } setMovies(loadedData); } catch (error) {} } useEffect(() => { movieData(); }, []); return ( <React.Fragment> <div> <h1>All Quotes</h1> {/* <button onClick={movieData}>fetch data</button> */} <QuoteList quotes={movies} /> </div> <QuotesDetail quotes={movies} /> </React.Fragment> ); };

Página de visualización de comillas simples

 const QuotesDetail = (props) => { const params = useParams(); const match = useRouteMatch(); // console.log(match) // console.log(params.id) var existData = props.quotes.find((obj) => obj.id === params.id);``` Getting error find is undefined.
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!