---
title: "Discussion on \"Redux vs. MobX by example — Part II: The Simplicity of MobX, and Conclusion\" | Hashnode"
description: "Discussion on \"Redux vs. MobX by example — Part II: The Simplicity of MobX, and Conclusion\". Continued from Redux vs. MobX by example — Part I: Intro, and Exploring Redux…\nWhile Redux has an opinionated structure for managing your state; with MobX, you’re free to architect the structure and location of state in your app, as you see it fit.\nM..."
url: "https://hashnode.com/posts/redux-vs-mobx-by-example-part-ii-the-simplicity-of-mobx-and-conclusion/57ee4e59ff74ff60ef080e88"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Redux vs. MobX by example — Part II: The Simplicity of MobX, and Conclusion](https://saiki.hashnode.dev/redux-vs-mobx-by-example-part-ii-the-simplicity-of-mobx-and-conclusion?utm_source=hashnode&utm_medium=feed)

Continued from Redux vs. MobX by example — Part I: Intro, and Exploring Redux… While Redux has an opinionated structure for managing your state; with MobX, you’re free to architect the structure and location of state in your app, as you see it fit. M...

Sep 29, 2016 · 7 min read · saiki.hashnode.dev  
Updated Apr 30, 2022  
Read the article

-   [#mobx](https://hashnode.com/tag/mobx)
-   [#es6](https://hashnode.com/tag/es6)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#redux](https://hashnode.com/tag/redux)

## Written by

[Sai Kishore Komanduri](https://hashnode.com/@saiki)

@saiki · Bangalore, India

  
[View profile](https://hashnode.com/@saiki)

Engineering an eGovernance Product | Hashnode Alumnus | I love pixel art

I have been in love with computers and everything related since I played my first game of Dangerous Dave back in the 90s. Graduating with a master&#39;s degree in Biology, and a bachelor&#39;s in Pharmacy; I have been fortunate enough to dabble my hands in things ranging from copywriting to computer networks. I love pixel art! I&#39;ve written a few more things about me, here and here !

## Responses 3

Markdown supported · ⌘↵ to post

[Marek Prihoda](https://hashnode.com/@marekp)

[Nov 14, 2016](https://hashnode.com/posts/redux-vs-mobx-by-example-part-ii-the-simplicity-of-mobx-and-conclusion/57ee4e59ff74ff60ef080e88/comment/582a2917acb107c39dc430f4)

There is a mistake in the new commit that was supposed to fix the problem when clicking the checkboxes.

`@observable this.isDone;`

should be

`@observable isDone;`

[Sai Kishore Komanduri](https://hashnode.com/@saiki)

[Nov 15, 2016](https://hashnode.com/posts/redux-vs-mobx-by-example-part-ii-the-simplicity-of-mobx-and-conclusion/57ee4e59ff74ff60ef080e88/comment/582a2917acb107c39dc430f4#reply-582a725eacb107c39dc43153)

Thanks for the heads-up @marekp! I'd fixed this locally but forgot to push the change to remote. Here is the fixed [commit](https://github.com/fatman-/minimal-todo-react/commit/15c044ceb7af8c70b0188cf9f65037d5bfe11901).

[Marek Prihoda](https://hashnode.com/@marekp)

[Nov 14, 2016](https://hashnode.com/posts/redux-vs-mobx-by-example-part-ii-the-simplicity-of-mobx-and-conclusion/57ee4e59ff74ff60ef080e88/comment/582a2623acb107c39dc430de)

Great tutorial, thanks! However, it is not very clear to me how come that the list of visible todos gets updated when user adds a new todo. Seems like a real magic to me. How does the TodoApp learn about the updated todos?

[Sai Kishore Komanduri](https://hashnode.com/@saiki)

[Nov 15, 2016](https://hashnode.com/posts/redux-vs-mobx-by-example-part-ii-the-simplicity-of-mobx-and-conclusion/57ee4e59ff74ff60ef080e88/comment/582a2623acb107c39dc430de#reply-582a74dcacb107c39dc43157)

We have specified, the `todos` array as an `@observable`. Whenever we make any changes to an `@observable`; the components decorated with `@observer` will autorun/rerun the `render` method.

Similarly, with `@computed`, whenever an `@observable` changes; the functions decorated with `@computed` are run, which get the required properties from the`@observable` data, and they compute the derivations, as required... and that's how we get `visibleTodos`.

If you're interested to know more, check out the [MobX docs](https://mobxjs.github.io/mobx/refguide/computed-decorator.html). They're very well written.

[Alex Valex](https://hashnode.com/@alexvalex)

[Nov 6, 2016](https://hashnode.com/posts/redux-vs-mobx-by-example-part-ii-the-simplicity-of-mobx-and-conclusion/57ee4e59ff74ff60ef080e88/comment/581fb46e944f78178b67ea7a)

Looks like current mobx branch code does not respond to checkbox action. What is the process to figure out what went wrong with MobX magic?

[Sai Kishore Komanduri](https://hashnode.com/@saiki)

[Nov 7, 2016](https://hashnode.com/posts/redux-vs-mobx-by-example-part-ii-the-simplicity-of-mobx-and-conclusion/57ee4e59ff74ff60ef080e88/comment/581fb46e944f78178b67ea7a#reply-58204561944f78178b67eb56)

Hi, @alexvalex! Thanks for pointing out the error. It was due to [this](https://github.com/fatman-/minimal-todo-react/commit/525711316203390c4ee76ed56eaa75abdd654ed8) commit.

From MobX's `@observable` [documentation](https://mobxjs.github.io/mobx/refguide/observable.html):

> If value is an object with a prototype, a JavaScript primitive or function, a Boxed Observable will be returned. MobX will not make objects with a prototype automatically observable; as that is the responsibility of its constructor function. Use extendObservable in the constructor, or `@observable` in its class definition instead.

By removing the observable on the `isDone` property of the `Todo` objects in the above commit, MobX was not reacting to the changes in `Todo` objects.

This is now [fixed](https://github.com/fatman-/minimal-todo-react/commit/15c044ceb7af8c70b0188cf9f65037d5bfe11901), in the `mobx` branch; and everything should work as expected. Let me know, if you run into any more problems. :)
