safeReference causes "Computed values are not allowed to cause side effects" error #1291
Open
3 tasks done
Labels
bug
Confirmed bug
Bug report
Sandbox link or minimal reproduction code
https://codesandbox.io/s/mst-safereference-with-computed-bug-7qizx
Describe the expected behavior
I'm building a pretty complex application with a lot of models and computed properties (minimal example of usage in codesandbox). Some of the models require
safeReference
to be used. But it doesn't work.Currently, as a workaround, I'm using raw value of
rootStore.list
instead ofrootStore.list.asArray
workaround for arrays (not sure if I still need it, do I?), but even if there is no need forasArray
for arrays I'm not sure it won't break someday in another way while using several nested views.Describe the observed behavior
When I've tried to use several nested computed (views) with
safeReference
in one of my models, got an error (see codesandbox for details):The text was updated successfully, but these errors were encountered: