Use observable objects, arrays, and maps to store state in MobX

Share this video with your friends

Send Tweet

So far we have used the observable decorator extensively. Let's take a closer look on what it does and see how the extendObservable and observable functions can be used to create observable objects, arrays and maps.

Parker
~ 8 years ago

It seems like getting the Kelvin and Fahrenheit reversed is going to be an ongoing thing... Is there any way to fix this? It is pretty distracting to the otherwise great lesson.

Michel Weststrateinstructor
~ 8 years ago

Saddly not without re-recording all the videos. It is a really stupid mistake (I'm only used to Celsius myself ;-)) so I hope it is not too much in the way!

Philipp Blume
~ 5 years ago

const temps = observable ([]); temps.push(new Temperature())

But.. how can you push to a const?

Edward Nnadi
~ 5 years ago

But.. how can you push to a const?

const doesnot make an object to which points 'temps' immutable, you just cannot reassign and redeclare the 'temps' variable again