shawnmcknight / react-scrollbar-size Goto Github PK
View Code? Open in Web Editor NEWReact hook to calculate the size of browser scrollbars.
License: MIT License
React hook to calculate the size of browser scrollbars.
License: MIT License
Wrong export of ScrollbarSizeChangeHandlerParams
and ScrollbarSizeProps
that causes Declaration or statement expected
error.
It should look like this:
import ScrollbarSize, { ScrollbarSizeChangeHandlerParams, ScrollbarSizeProps } from './ScrollbarSize';
export { ScrollbarSizeChangeHandlerParams, ScrollbarSizeProps };
export default ScrollbarSize;
My project fails to load.
It should load.
Steps:
ScrollbarSize
and ScrollbarSizeChangeHandlerParams
I'm simply trying to use it.
Tech | Version |
---|---|
React-Scrollbar-Size | v3.0.1 |
React | 16.13.1 |
Browser | Chrome |
TypeScript | 3.7.2 |
I forked the repo and created a fix. If you want me to create PR I'll gladly do so. Just let me know which branch to merge.
I tried installing and building many times, but I can't get the webpack2 build to succeed:
ERROR in ../node_modules/react-scrollbar-size/ScrollbarSize.js
Module not found: Error: Can't resolve 'lodash/throttle' in '..\node_modules\react-scrollbar-size'
@ ../node_modules/react-scrollbar-size/ScrollbarSize.js 39:16-42
@ ../node_modules/react-scrollbar-size/index.js
@ ../node_modules/material-ui/Tabs/Tabs.js
@ ../node_modules/material-ui/Tabs/index.js
@ ../node_modules/material-ui/index.es.js
@ ./components/Welcome.js
I verified that NPM installs lodash into node_modules and it does have throttle exported from index.js.
Using Node 8 LTS (8.9.3) and NPM 5.5.1. This is probably some configuration mistake, and I will post here if I manage to solve it - might be useful to keep this issue around in case someone else has the same problem.
A picture worth a thousand words.
@shawnmcknight shawnmcknight Please, can we do something about it ๐ ?
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: Cannot find preset's package (:onlyNpm)
Dependabot badge is reporting inactive even though dependabot is activated in the repo. Tracking issues found at dependabot/dependabot-core#1912 and dependabot/dependabot-core#1960.
Dependabot badge should report active since it is enabled in the repo.
Very minor issue. It would be good to not give a misconception that Dependabot is not actively monitoring this repo. However, other badges exist to show dependency state so it would still show properly.
When adding material-ui (v1 beta) to a project, I get an error...
[email protected] requires a peer of lodash@^4.17.0 but none was installed.
My project is still using lodash v3, and upgrading lodash would be a pretty crazy effort.
Would it be possible to reduce the lodash version required by react-scrollbar-size? I think that throttle
worked the same in lodash v3.
Or, alternately, how about using a regular dependency (instead of peerDependency) for the one function needed: lodash.throttle?
Thanks :)
Is there any change you can declare react as a peer dependency? Otherwise this causes the dreaded https://facebook.github.io/react/warnings/refs-must-have-owner.html error when used in a larger project.
Projects that use React 16 could use this if the peer dep resolver was changed
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
@types/react
, @types/react-dom
)@babel/cli
, @babel/core
, @babel/node
, @babel/preset-env
, @babel/preset-react
, @babel/preset-typescript
)These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
fs-extra
, @types/fs-extra
)jest
, jest-environment-jsdom
)@typescript-eslint/eslint-plugin
, @typescript-eslint/parser
).circleci/config.yml
node 5.1.0
package.json
@babel/cli 7.22.10
@babel/core 7.22.10
@babel/node 7.22.10
@babel/preset-env 7.22.10
@babel/preset-react 7.22.5
@babel/preset-typescript 7.22.5
@testing-library/jest-dom 5.17.0
@testing-library/react 13.4.0
@types/fs-extra 9.0.13
@types/node 18.17.6
@types/react 18.2.20
@types/react-dom 18.2.7
@typescript-eslint/eslint-plugin 5.62.0
@typescript-eslint/parser 5.62.0
cross-env 7.0.3
eslint 8.47.0
eslint-config-airbnb 19.0.4
eslint-config-airbnb-typescript 17.1.0
eslint-config-prettier 8.10.0
eslint-plugin-import 2.28.1
eslint-plugin-jest 26.9.0
eslint-plugin-jsx-a11y 6.7.1
eslint-plugin-react 7.33.2
eslint-plugin-react-hooks 4.6.0
eslint-plugin-testing-library 5.11.1
fs-extra 10.1.0
husky 8.0.3
jest 28.1.3
jest-environment-jsdom 28.1.3
lint-staged 13.3.0
normalize.css 8.0.1
npm-run-all 4.1.5
parcel 2.9.3
prettier 2.8.8
react 18.2.0
react-dom 18.2.0
rimraf 3.0.2
typescript 4.9.5
react ^16.8.0 || ^17.0.1 || ^18.0.0
node >=14.0.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.