joelmturner pyramid logo

About

Blog

Illustration

TIL

Uses

About

Blog

Illustration

TIL

Uses

Mobx

Debugging

trace()

trace() helps show what it was that made MobX update. this is helpful for tracking down unexpected renders or infinite loops.

import {trace} from 'mobx-react'
{...}
render() {
trace();
return ();
}

toJS()

Each observable has a method of toJS() on it. May need to look into typing them correctly.


Discuss this article on Twitter

Category:

state-management

© 2012-2023, built with Next.js and Chakra UI

InstagramtwitterlinkedIngithubjoelmturner's DEV Profilejoelmturner's Mastodon Profile