Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Make interpolate-components smaller. #14

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

sgomes
Copy link

@sgomes sgomes commented Aug 1, 2019

The library depended on react-addons-create-fragment, a deprecated utility that is easily replaceable with native Fragment support in React.

Dropping this utility saves around 1.6KB (compressed).

In addition, this change updates all dependencies and adds minification to the build process, to reduce the library size further.

All of this results in a breaking change, and thus a new major version.

@ockham: as it's been a while since this project got updated, please CC in other folks if you're no longer the right person to review this 🙂

Fixes #16
Fixes #15
Fixes #13

The library depended on `react-addons-create-fragment`, a
deprecated utility that is easily replaceable with native Fragment
support in React.

Dropping this library saves around 1.6KB (compressed).

In addition, this change updates all dependencies and adds minification
to the build process, to reduce the library size further.
@sgomes sgomes requested a review from ockham August 1, 2019 14:37
These are peerDependencies for consumers and devDependencies for testing.
We should not be depending on our own version of react.

Fixes #15
@sirreal
Copy link
Member

sirreal commented Nov 2, 2021

Thanks for this @sgomes!

I pushed a couple of changes and I think we can ship this as 2.0.0 (ideally as next while we give it a test).

That fixes all the issues in this repo and puts us in a good place with v2. I hope you don't mind my piling on here! Let's make sure tests are passing, then I'll give this a spin and approve.

Copy link
Author

@sgomes sgomes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for updating this, @sirreal ! I think this is still a good idea but I'm not sure if this is still the right place to do it. I thought the canonical location for this package was now in the wp-calypso repo?

@@ -1,5 +1,12 @@
# Changelog

## 2.0.0
* Breaking change: require React ^16.2.0 (for native Fragment support)
* Breaking change: `react` and `react-com` are now `peerDependencies`.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Breaking change: `react` and `react-com` are now `peerDependencies`.
* Breaking change: `react` and `react-dom` are now `peerDependencies`.

@sirreal
Copy link
Member

sirreal commented Nov 2, 2021

I thought the canonical location for this package was now in the wp-calypso repo?

I had no idea, thanks! It looks like that packages has a different name, I wonder what we can do to make it clear the upgrade path is to change packages. I'll reach out to folks based on what you linked.

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

Successfully merging this pull request may close these issues.

Drop react-addons-create-fragment Why does this depend on react-dom? CircleCI is failing
2 participants