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

321
Views
Estoy tratando de crear un sitio web de reacción y agregar ganchos en él, pero me enfrento a estos errores
import { useState } from "react"; const TronWeb = require("tronweb"); const [lpLogged, setlpLogged] = useState(true); async function getTronWeb() { if (window.tronWeb && window.tronWeb.defaultAddress.base58) { return window.tronWeb; } return null;} let curweb = getTronWeb (); async function initWindow() { if (curweb == null) { setlpLogged((lpLogged) => false); alert.show("We were unable to find any suitble providder."); } else { setlpLogged((lpLogged) => true); } } <button onclick={initWindow}>Can you get tronweb from tronlink?</button>
 Compiled with problems:X

ERROR en ./src/App.js 12:35-39

exportar 'predeterminado' (importado como 'Cuerpo') no se encontró en './componentes/Cuerpo' (el módulo no tiene exportaciones)

ERROR

[eslint] src\components\Body.js Línea 8:33: React Hook "useState" no se puede llamar en el nivel superior. Los React Hooks deben llamarse en un componente de función React o en una función React Hook personalizada react-hooks/rules-of-hooks

Busque las palabras clave para obtener más información sobre cada error.

este es el error al que me enfrento al ejecutarlo

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

intente arreglar la importación: import React,{useState} from "react";

Además, verifique el método de exportación en el componente Cuerpo.

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!