Immer: Mobx

Created on 4 Jan 2018  路  1Comment  路  Source: immerjs/immer

Did you thought about integrating immer into Mobx? (just curious). Observable that would modify themselves in immutable way. That could make Mobx immutable in simple way.

Most helpful comment

Thought about that, but it is not that simple; in an immutable data model references are not stable, so you cannot hold on to references to an object somewhere in the state tree. Which is a property of mutability that MobX leverages a lot (it allows for child components in React to render independently of their parent for rexample)

>All comments

Thought about that, but it is not that simple; in an immutable data model references are not stable, so you cannot hold on to references to an object somewhere in the state tree. Which is a property of mutability that MobX leverages a lot (it allows for child components in React to render independently of their parent for rexample)

Was this page helpful?
0 / 5 - 0 ratings