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

146
Views
¿Por qué obtengo objeto objeto en mi cuadro de entrada reaccionar jsx

Estoy atascado en hacer que los componentes funcionen.

console.log e imagen localhost

Creo que tiene algo que ver con handleChange pero no puedo resolverlo.

 import React, { useState } from 'react'; export default function FindCountry({ setNews }) { const [idInput, setIdInput] = useState(''); const [errors, setErrors] = useState(''); function getCountryID() { const url = `https://newsapi.org/v2/top-headlines?country=${idInput}&apiKey=${process.env.REACT_APP_GIPHY_KEY}`; fetch(url) .then((res) => res.json()) .then((res) => { console.log('We have data!', res); setIdInput(res); setErrors(''); }) .catch((error) => { console.error(error); setErrors('Invalid Input'); }); } function handleChange(e) { setIdInput(e.target.value); } function handleSubmit(e) { e.preventDefault(); getCountryID(); }
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!