• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

163
Views
javascript esto en el controlador de eventos del componente de la función de reacción
const TimerView = observer(() => { const [timer] = useState(() => observable({ secondsPassed: 1, increaseTimer() { console.log(this, 888); this.secondsPassed++; }, }) ); return ( // when click the span, error: this is undefined // <span onClick={timer.increaseTimer}> // Seconds: {timer.secondsPassed} // </span> // <span onClick={() => timer.increaseTimer()}> Seconds: {timer.secondsPassed} </span> // this one works fine ); });

observador y observable están en mobx y mobx-react-lite. ¿Cuál es la diferencia entre estas dos situaciones? Es tan confuso.

over 3 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 Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error