Comments (6)
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.
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.
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.
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.
Agree with @yched, that's a significant difference in install size:
from react-debounce-render.
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)
- Decorator-friendly higher-order component HOT 7
- Warning with react 16.5.0 : "It is not recommended to assign props directly to state..." HOT 2
- Use lodash.debounce for smaller install size HOT 1
- Typescript support HOT 4
- Throttle rather than debounce? HOT 4
- Could you please share changes for the latest v6.0.0 release? HOT 2
- full Typescript support HOT 1
- [Question] Should this work with react-native? HOT 2
- Make composable with lodash.flowRight & ramda.compose HOT 5
- Is it working for functional components?
- README inaccurate with { leading: false }? HOT 2
- Display name is missing
- Lack of TS support while installing `react-debounce-render` from `npm`. HOT 3
- React 16 HOT 3
- Add support for react 18 HOT 1
- v 8.0.2 won't work in jest tests while 7.0.1 did: Jest encountered an unexpected token HOT 2
- Throws a warning when component is unmounted before the debounced function executes HOT 4
- MAYBE
- Drop componentWillReceiveProps in favor of the more future-proof getDerivedStateFromProps HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-debounce-render.