Coder Social home page Coder Social logo

Comments (6)

podefr avatar podefr commented on May 28, 2024 3

I just pushed version 5.0.0 which removes the dependency on lodash in favor of lodash.debounce.
I'll close this issue, feel free to reopen if you're still seeing the bundle size issue.

Thanks all for your help!

from react-debounce-render.

yched avatar yched commented on May 28, 2024 1

Also, PR #7 reverted using lodash.debounce in favor of using the complete lodash on the basis that lodash.debounce hadn't been updated for two years.

However, it does look like the code in lodash.debounce 4.0.8 is the exact same that ships with lodash 4.17.10 - i.e. debounce hasn't been touched in two years, so it's totally normal that lodash.debounce hasn't been republished since then.

(there is indeed a 2018 commit on debounce in lodash master, but it's not in release 4.17.10)

--> Looks like we could revert PR #7 and just go back to using lodash.debounce ?
Importing the minimal dependency is always better than importing a huge bundle and relying on tree-shaking :-)

from react-debounce-render.

podefr avatar podefr commented on May 28, 2024

Hi Yves, as you've mentioned this issue has been discussed already in Pull Request #7. May I close this issue as well?

Thanks,
Olivier

from react-debounce-render.

yched avatar yched commented on May 28, 2024

Well, as I wrote in PR #7, the current situation is still weird - package.json requires both lodash and lodash.debonuce, but only needs one of the two.

I was too quick in titling this issue (it's lodash.debounce that is currently unused), but it still seems like something needs fixing ?

from react-debounce-render.

amio avatar amio commented on May 28, 2024

Agree with @yched, that's a significant difference in install size:

image

from react-debounce-render.

podefr avatar podefr commented on May 28, 2024

sorry for the oversight, it definitely looks like in trying to resolve the bundle size issue I ended up leaving both lodash and lodash.debounce as deps. When I investigated it looked like lodash.debounce was behind. I checked again and you're right they're both the same version. I'll switch back to using the lodash.debounce instead, sorry about that!

from react-debounce-render.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.