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

229
Views
¿Cómo mostrar el resultado de la función en la tabla después de presionar el botón?

Creé una tabla, un botón y una entrada usando chakra ui. Quiero que la función se ejecute después de "onClick" para mostrar su resultado en una tabla. Mi principal problema es el uso de useState(). No estoy seguro si lo estoy haciendo bien. No se intenta "ingresar" el resultado de la función en la tabla del código. Cuando probé tales soluciones, la aplicación web no se cargó. Por favor ayuda

 Moralis.start({ serverUrl, appId, masterKey }); const query2 = new Moralis.Query('SpaceMissionsStarted'); const [inputValue, setInputValue] = useState(''); const tableRow = document.getElementById('event'); function findAddress() { const query2 = new Moralis.Query('SpaceMissionsStarted'); query2.equalTo('senderAddress', inputValue); } return ( <ChakraProvider theme={theme}> <Box textAlign="center" fontSize="xl"> <TableContainer> <Table variant="striped" colorScheme="telegram" size="sm" mt={5} maxW="500px" ml={300} > <TableCaption> SpaceMission Started Events Query Finder </TableCaption> <Thead> <Tr> <Th>Event name</Th> <Th>into</Th> <Th isNumeric>multiply by</Th> </Tr> </Thead> <Tbody> <Tr> <Td>...</Td> <Td>...)</Td> <Td isNumeric>...</Td> </Tr> <Tr> <Td>...</Td> <Td>..</Td> <Td isNumeric>...</Td> </Tr> </Tbody> <Tfoot> <Tr> <Th>Event name</Th> <Th id="event"></Th> <Th isNumeric>..</Th> </Tr> </Tfoot> </Table> </TableContainer> <Input placeholder="address" maxWidth="300px" onChange={e => setInputValue(e.target.value)} /> <Button colorScheme="telegram" ml={50} onClick={findAddress} id="button" > Find </Button> </Box> </ChakraProvider>
about 4 years ago · Santiago Gelvez
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!