有沒有辦法react-recoil在 IE11 中使用?
我知道 IE 現在已經死了,但不知何故我需要支持舊的瀏覽器,比如IE11
我剛剛使用 with 創建了一個普通的應用程式create-next-app。
# in package.json
...
"dependencies": {
...
"recoil": "^0.7.5",
...
}
當我嘗試使用react-recoil時,它會不斷拋出類似的錯誤
This element does not support 'attachShadow'
The above error occurred in the <Portal> component:
at Portal ...
at ReactDevOverlay ...
at construct ...
at AppContainer ...
at Root ...
React will try to recreate this component tree from scratch using the error boundary you provided, Container.
有誰知道如何react-recoil在 IE11 中使用?
謝謝 :)
uj5u.com熱心網友回復:
根據官方檔案,您需要使用Babel編譯代碼并使用預設@babel/preset-env。但是,不建議這樣做,因為需要 ES6。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/512479.html
