Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use spread over Object.assign #193

Merged
merged 2 commits into from
Jul 27, 2017
Merged

Use spread over Object.assign #193

merged 2 commits into from
Jul 27, 2017

Conversation

bogas04
Copy link
Contributor

@bogas04 bogas04 commented Jul 27, 2017

What: Object.assign is being replaced by Object spread syntax.

Why: Object spread doesn't require you to also include polyfill for Object.assign, hence it's better for users trying it out on older browsers.

Checklist:

  • Documentation
  • Tests
  • Code complete

@codecov-io
Copy link

codecov-io commented Jul 27, 2017

Codecov Report

Merging #193 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #193   +/-   ##
=======================================
  Coverage   89.13%   89.13%           
=======================================
  Files          22       22           
  Lines         847      847           
  Branches      219      219           
=======================================
  Hits          755      755           
  Misses         70       70           
  Partials       22       22
Impacted Files Coverage Δ
src/react/index.js 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 72abd4d...f6e7a90. Read the comment docs.

@thangngoc89
Copy link
Contributor

Object spread doesn't require you to also include polyfill for Object.assign, hence it's better for users trying it out on older browsers

Actually, babel includes Object.assign polyfill for object spread.

@bogas04
Copy link
Contributor Author

bogas04 commented Jul 27, 2017

@thangngoc89 it includes it for spread, but if you directly use Object.assign, then the user library will need to add polyfill.

@tkh44
Copy link
Member

tkh44 commented Jul 27, 2017

@thangngoc89 he has a point.

@tkh44 tkh44 merged commit 18f91da into emotion-js:master Jul 27, 2017
@bogas04
Copy link
Contributor Author

bogas04 commented Jul 27, 2017

Thank you so much for accepting the PR ! I feel I didn't quite explain myself well. Either way, kudos to Emotion for being awesome !

@thangngoc89
Copy link
Contributor

Yeah. I didn't think about manually providing Object.assign polyfill

@bogas04
Copy link
Contributor Author

bogas04 commented Jul 28, 2017

@thangngoc89 Sorry for the rush, but when can I expect this patch to get released to npm ? Thanks!

@bogas04 bogas04 deleted the patch-2 branch July 28, 2017 03:54
@thangngoc89
Copy link
Contributor

thangngoc89 commented Jul 28, 2017

@bogas04 No idea. Ask @tkh44 . Current he's focusing on shaping version 7.0 which is a major rewrite of emotion core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants