Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Package size concern over fbjs #742

Closed
oliviertassinari opened this issue Sep 24, 2018 · 4 comments · Fixed by #744 or pulkitkkr/recompose#1
Closed

Package size concern over fbjs #742

oliviertassinari opened this issue Sep 24, 2018 · 4 comments · Fixed by #744 or pulkitkkr/recompose#1

Comments

@oliviertassinari
Copy link
Contributor

oliviertassinari commented Sep 24, 2018

A picture worth a thousand words 2.74M is a lot (I'm trying to reduce Material-UI footprint):

capture d ecran 2018-09-24 a 19 25 23

https://packagephobia.now.sh/result?p=recompose


Most of this bytes seem to be coming from https://packagephobia.now.sh/result?p=fbjs.

import shallowEqual from 'fbjs/lib/shallowEqual'

I understand why it was added in the first place, to match React internals, but they have recently removed the fbjs dependency: facebook/react#13046.
What do you think of using a lighter alternative?

@gaearon By any chance, do you have an advice for the replacement of shallow equal? Thanks!

@oliviertassinari oliviertassinari changed the title Package size concern Package size concern overfbjs Sep 24, 2018
@oliviertassinari oliviertassinari changed the title Package size concern overfbjs Package size concern over fbjs Sep 24, 2018
@wuct
Copy link
Contributor

wuct commented Sep 24, 2018

Thanks for analyzing! I’d like to change it if there is a good alternative.

@gaearon
Copy link

gaearon commented Sep 25, 2018

@gaearon By any chance, do you have an advice for the replacement of shallow equal, thanks?

Copy and paste, it's a trivial module

shysteph added a commit to shysteph/recompose that referenced this issue Oct 1, 2018
Fix acdlite#742 using solution from @gaearon (copy/paste)
shysteph added a commit to shysteph/recompose that referenced this issue Oct 1, 2018
Fix acdlite#742 using solution from @gaearon (copy/paste)
istarkov pushed a commit that referenced this issue Oct 1, 2018
Fix #742 using solution from @gaearon (copy/paste)
@prograhamer
Copy link

Is there any plan for a release containing these changes? Cheers!

@oliviertassinari
Copy link
Contributor Author

I have personally removed this dependency from all my packages. Hooks should be enough now.

pulkitkkr added a commit to shakacode/recompose that referenced this issue Nov 9, 2020
Fix acdlite#742 using solution from @gaearon (copy/paste)
pulkitkkr added a commit to shakacode/recompose that referenced this issue Nov 9, 2020
* Remove fbjs dependency

Fix acdlite#742 using solution from @gaearon (copy/paste)

* Compile Recompose

Co-authored-by: Stephanie Miller <smiller@generalcode.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants