Skip to content

Comments

Use just utilities instead of lodash#112

Open
ksheedlo wants to merge 1 commit intoeiriklv:masterfrom
ksheedlo:just
Open

Use just utilities instead of lodash#112
ksheedlo wants to merge 1 commit intoeiriklv:masterfrom
ksheedlo:just

Conversation

@ksheedlo
Copy link

This change reduces the Javascript footprint of react-masonry-component
by switching to https://github.com/angus-c/just

This change reduces the Javascript footprint of react-masonry-component
by switching to https://github.com/angus-c/just
@afram
Copy link
Collaborator

afram commented Dec 14, 2017

hi @ksheedlo

Thanks for this PR, just wondering how do you use this library i your project?

We migrated over to the lodash library because most people these days if using React are using Webpack/Rollup with tree pruning so you wouldn't get all of the extra unused methods.

Have you had any particular issues?

@ksheedlo
Copy link
Author

ksheedlo commented Dec 18, 2017

We are using browserify, but just should be lighter regardless of what bundler you are using.

Here's a table of imported package weights sourced from bundlephobia.com

Package Minified + gzipped size
just-merge 261 B
just-debounce-it 207 B
just-omit 208 B
lodash.omit 2.5 KB

Just lodash.omit by itself is 4X larger than all 3 just utilities put together.

@kuznetsov-from-wonderland

Waiting for this PR being accepted. We have lodash as peer dep in our projects.

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.

3 participants