Recompose: Package size concern over fbjs

Created on 24 Sep 2018  路  4Comments  路  Source: acdlite/recompose

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. https://github.com/acdlite/recompose/blob/7d5adf7f49b21e3693f7d631551d282e5c8ef820/src/packages/recompose/shallowEqual.js#L1

I understand why it was added in the first place, to match React internals, but they have recently removed the fbjs dependency: https://github.com/facebook/react/pull/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!

Most helpful comment

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

Copy and paste, it's a trivial module

All 4 comments

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

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

Copy and paste, it's a trivial module

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

franklinkim picture franklinkim  路  3Comments

isubasti picture isubasti  路  3Comments

robbporto picture robbporto  路  3Comments

finom picture finom  路  3Comments

astanciu picture astanciu  路  3Comments