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

184
Views
Símbolo inesperado '{'

mi código me parece bien, pero tal vez puedas encontrar el error. ¡Gracias! en vscode, mi código no tiene ningún error, pero cuando lo ejecuto en Google Chrome, aparece este error:

SyntaxError no detectada: fichas inesperado '{'

Contexto

ventana emergente.html

Rastreo de pila

popup.js:16 (función anónima)

*y esta parte se resaltó*: <Button variant="outlined" onClick={textValueFn}>Play</Button>

 import ReactDOM from 'react-dom'; import React, {useState} from 'react'; function App() { const [text, setText] = useState(); let textValueFn = (event) => { const textValue = event.target.value; setText(textValue); }; return ( <div> <Input placeholder="Type in your text here" inputProps={ariaLabel} /> <Button variant="outlined" onClick={textValueFn}> Play </Button> <h1>{text}</h1> </div> ); } ReactDOM.render( <App/> , document.getElementsByClassName('app') )
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Tal vez el problema aquí es con ariaLabel prop que no está pasando al componente. Y el segundo problema es con los componentes Input y Button que no está importando. Si tiene la intención de usar componentes nativos de entrada y botón, simplemente reemplace Input con input y Button con button .

Aquí está el cambio que hice en el código:

 import React, { useState } from "react"; export default function App({ ariaLabel }) { const [text, setText] = useState(); let textValueFn = (event) => { const textValue = event.target.value; setText(textValue); }; return ( <div> <input placeholder="Type in your text here" inputProps={ariaLabel} /> <button variant="outlined" onClick={textValueFn}> Play </button> <h1>{text}</h1> </div> ); }

Editar celoso-saha-e0mj6

about 4 years ago · Juan Pablo Isaza Report
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!