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

201
Views
¿Cómo obtener el elemento DOM de un componente envuelto `observer`?

He definido mis componentes JSX así:

 const ComponentA = observer(({state}) => {return <div></div>})

Estoy usando observer de mobx: https://mobx.js.org/react-integration.html

Necesito ver cuál es la altura representada del div usando la API del navegador para el nodo DOM. Diferirá según el contenido que contenga.

¿Cómo puedo hacer eso?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Lo siento, realmente no entiendo a qué estás tratando de llegar. ¿Quizás esto ayudará?

 const divRef = useRef(); useEffect(() => { console.log(divRef.current.clientHeight); }, []); return <div ref={divRef}></div>
about 4 years ago · Santiago Trujillo 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!