brigand / react-global-style

Set global styles (e.g. on document.body) declaratively.
3 stars 2 forks source link

ES5 compatibility #1

Open kristerkari opened 7 years ago

kristerkari commented 7 years ago

This project is currently using ES6 Map and WeakMap. There are still quite a few browsers that don't support ES6 features used by people every day, which means that those browsers need polyfills for Map and WeakMap.

What do you think of the idea of making the code ES5 compatible, so that the polyfills can be avoided?

ping @brigand

kristerkari commented 7 years ago

Hmm... let's try again, @brigand

brigand commented 7 years ago

@kristerkari sorry, I missed this issue.

It does look like this code could be written without Map and WeakMap. I'd love a PR, but I won't have time to work on it in the near future. Put a note in my calendar so I don't completely forget about it.

I added a note about required polyfills to the readme for now.

kristerkari commented 7 years ago

Good to hear 👍 I can have a look at making required changes for a PR. Thanks!