-1

Im use mobx in react project, and my project cannot run on explorer (ie11). I get an error that only mobx 4 can work with ie11. Is it possible to downgrade mobx from 5 to 4 in my project? If it possible how can I do it?

Thanks!

DorCo
  • 7
  • 4

1 Answers1

0

There might be small differences but I think if you used decorator api MobX 4 and 5 are mostly backwards compatible.

So you just change version in package.json and see if it works and what errors it gives you, some methods might have different names, I think, but the core is the same.

If you decide to go with MobX 6 (it also works in IE11, if configured correctly) then it is a little bit more work, described here https://mobx.js.org/migrating-from-4-or-5.html

But it might be easier if you used decorate api from MobX5, because then you can just change it to makeObservable

Danila
  • 3,703
  • 2
  • 11
  • 32