piotrwitek / typesafe-actions

Typesafe utilities for "action-creators" in Redux / Flux Architecture
https://codesandbox.io/s/github/piotrwitek/typesafe-actions/tree/master/codesandbox
MIT License
2.41k stars 98 forks source link

Doc: specify that a polyfill for Object.assign is needed #56

Closed renchap closed 6 years ago

renchap commented 6 years ago

Old browsers (IE 11, Safari on iOS 8) do not support Object.assign but it is used in typesafe-actions. Many other libraries are using a polyfill (short custom implementation or external polyfill bundled using Babel). As this package targets es5 (in tsconfig.json), Object.assign is not transpiled and generate errors in those old browsers.

I am fine with this package targeting es5, but it should be noted explicitely in the README, and a list of needed polyfills should be provided. For example, here is how React does it: https://reactjs.org/docs/javascript-environment-requirements.html

I tested my app with Object.assign, Map, Set and Symbol polyfills (the 3 latest needed for React) and it worked fine on iOS 8 & IE 11, so I guess Object.assign is the only one needed (or maybe Symbol too?) for typesafe-actions.

piotrwitek commented 6 years ago

Hi, Thanks for suggestion, I completely agree, let's make it a new feature request!

piotrwitek commented 6 years ago

Requirements:

IssueHuntBot commented 6 years ago

@loadbalance-sudachi-kun funded this issue with $256. Visit this issue on Issuehunt

IssueHuntBot commented 6 years ago

@piotrwitek has started working. Visit this issue on Issuehunt

IssueHuntBot commented 6 years ago

@piotrwitek has submitted output. Visit this issue on Issuehunt

IssueHuntBot commented 6 years ago

@piotrwitek has rewarded. Visit this issue on Issuehunt