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 just utilities instead of lodash #112

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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