mobxjs / mobx

Simple, scalable state management.

Home Page:http://mobx.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not working at IE11 with latest MobX 6

Dev-Taehui opened this issue · comments

Intended outcome: Working at IE11

Actual outcome: Not working at IE11 and throws exception (@@toPrimitive must return a primitive value.)

How to reproduce the issue: I created very simple and minimal reproducible github project (https://github.com/Dev-Taehui/ie11test).
Clone it, npm install, and npm run local for build and serve to local test.

Versions
MobX 6.10.2
React 17.0.2
React-Scripts 4.0.3
Node.js 18.17.1
IE 11

What is the latest version that does work, to be able to intersect a potential cause? (I don't have IE11 at my disposal here)

@mweststrate I tried MobX 6.3.3, MobX 6.0.0. But it doesn't work with same reason.

I tested IE11 with VBS script on Windows 11.
Create Launch IE.vbs file and write this command to it.

CreateObject("InternetExplorer.Application").Visible = true

Then, run it

@mweststrate According to the example I posted, calling mobx's configure({ useProxies: "never" }) in index.js does not work in IE11. If I remove that code it works on IE11

And, I create Next.js 12 and React 17 project. It has same error when I call configure({ useProxies: "never" }).

@mweststrate Does need other polyfills for CRA project? Accroding to thrown error, It seems to be that @@toPrimitive Symbol and decorator was not fully polyfilled.