-
Notifications
You must be signed in to change notification settings - Fork 384
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
Consider including Lodash in the project #124
Comments
👍 |
https://www.youtube.com/watch?v=Pq1RD22W7B4#t=55s I vote for lodash. CC: @jdalton |
More on lodash: https://github.com/Khan/style-guides/pull/28/files#files My personal preference is to lean on lodash for consistency. It's a lot of work to keep track of both, and like using the linters, I prefer consistency. |
@josiasds I put your name on this one. Should be quick. @alexfedoseev if we put lodash in the vendor bundle, I'm pretty sure that parts we don't user don't get stripped out. That's a need for jQuery. I'm thinking we could have a generated/vendor-optimized.js bundle that has all the other libraries we include with unused stripped out. I'd like to be able to see the project, non-vendor, code in it's own generated file, as that's useful for explaining what Webpack does. |
I know it's nice to have the webpage download as small as possible, but how many KB are we talking about here? If we use half of the lodash library and leave the other half unused, we'd be foregoing, what, 9KB of savings by just importing all of it? |
Fixed in #147 |
Take a look at this:
https://github.com/shakacode/react-webpack-rails-tutorial/pull/123/files#r42269891
The take away is this:
vs with Lodash:
I find lodash to be my swiss army knife when coding JS, and it fits in well with React.
In fact, Lodash is already an implicit dependency.
https://github.com/shakacode/react-webpack-rails-tutorial/blob/master/client/npm-shrinkwrap.json#L2669
Anybody second me?
@alexfedoseev @samnang @josiasds @mapreal19 @dylangrafmyre @rstudner?
The text was updated successfully, but these errors were encountered: