I've been learning MobX from the docs and wanted to replicate a normalized redux store in MobX.
I have a map of the authors authorsMap
with the author's id
as key and an array of authors' id, authorsArray
, which is used to preserve order the authors are received from the server.
A computed property iterates over authorsArray
and returns a new array with author objects.
Every time I add a new author to authorsArray
and auhorsMap
, my list component updates along with all the list items.
I've tried to figure it out from docs and I don't understand why it's happening, maybe I've missed something or maybe my expectations are wrong.
Here's the link to the sandbox https://codesandbox.io/s/gallant-clarke-u8ust?file=/src/App.js