alibaba / rax

🐰 Rax is a progressive framework for building universal application. https://rax.js.org
Other
8k stars 627 forks source link

[BUG] Remove Object.assign in rax #2130

Open SoloJiang opened 3 years ago

SoloJiang commented 3 years ago

In android 5.x or before this version, there isn't Object.assign method, but rax used it as assign method.

https://github.com/alibaba/rax/blob/master/packages/rax/src/assign.js

Pawanupadhyay10 commented 3 years ago

hi @SoloJiang , Is Asoc 2021 is happing or it will happen or it will not happen in 2021 , I did not find any link,news for Asoc 2021.

SoloJiang commented 3 years ago

What's your meaning? May u search it on caniuse?

ConradSollitt commented 2 years ago

Adding some links and info as I've used a Polyfill for this before (and in a project that uses Rax).

For most users it will not have an impact but for users with older Android devices (IE, etc) it will prevent the site from working.

Here is the caniuse link: https://caniuse.com/?search=object.assign

A widely used Polyfill Service is this one (created by a British/Global News Paper "Financial Times"). https://polyfill.io/v3/

This is the source (MIT License) so it can simply be copied if needed: https://github.com/Financial-Times/polyfill-library/blob/master/polyfills/Object/assign/polyfill.js

A more basic version of the polyfill is here: https://stackoverflow.com/a/42503820/3422084

I was just browsing open issues and haven't looked into the details of how Rax works for Polyfills but hopefully these links can help reduce the amount of work you need to do if handling this issue.

ConradSollitt commented 2 years ago

Also if you need help with this issue let me know. I'm happy to help.