-
Notifications
You must be signed in to change notification settings - Fork 489
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
react 18 support #380
Comments
+1 |
Npm install breaks because of this (I'm using React 18 in my project):
|
+1 |
1 similar comment
+1 |
+1 |
i created my own repo by cloning the package into a local dir
then, i update the i simply add react 18 to the accepted peer dependencies and it works fine. after updating package.json, run: i messed with npm link but i don't think i got it working. instead i did i removed eslint dev dependencies since they break the build and they don't really matter to my production app. it's probably not hard to fix the version conflicts but i don't care enough to do it since hard linking the package fulfills my usecase, at the moment. here is the full diff below: --- a/package.json
+++ b/package.json
@@ -36,11 +36,6 @@
"babel-preset-stage-0": "^6.22.0",
"chai": "^3.5.0",
"chai-spies": "^0.7.1",
- "eslint": "^4.18.2",
- "eslint-config-airbnb": "^14.1.0",
- "eslint-plugin-import": "^2.2.0",
- "eslint-plugin-jsx-a11y": "^4.0.0",
- "eslint-plugin-react": "^6.10.0",
"istanbul": "~0.4.5",
"istanbul-instrumenter-loader": "^0.2.0",
"karma": "^0.13.22",
@@ -64,7 +59,7 @@
"webpack-dev-server": "~1.10.1"
},
"peerDependencies": {
- "react": "^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0",
- "react-dom": "^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
+ "react": "^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0",
+ "react-dom": "^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0"
}
} dear maintainers, please fix this if you can |
this just bumps the peer deps and then it works npm i fails because of eslint packages. i removed them because id rather have a working production build than eslint tools.
+1 |
Hello @ameerthehacker, Thank you for your feedback, |
+1 |
I tried to use the react-lazyload in my web app, it works on web (Safari, Chrome, Mozilla) and tab (iPad) view. But when I checked in the mobile responsive view only my first two cards were loaded. The rest of the cards are shown as blank. Here I added the screenshots for your ref. "react": "^17.0.0", Thanks for your attention. I’m looking forward to your reply Rgrds, |
There is a fork that works with React 18, the link is here: #387 |
One acceptable workaround here. package.json {
"resolutions": {
"@types/react": "^18.0.0"
}
} @types/react-lazyload.d.ts import "react-lazyload";
declare module "react-lazyload" {
type children = React.ReactNode;
} |
Would it be possible to publish #387 update on NPM? Let me know if there's anything I can do to help. |
Yeah its merged but not on npm available @ameerthehacker |
This temporary workaround solved it for me — loading the package directly from the master branch in package.json: - "react-lazyload": "^3.2.0",
+ "react-lazyload": "github:twobin/react-lazyload", |
Any update on this? |
@remy727 it should be resolved now. Let us know if you still face any issue. |
title
The text was updated successfully, but these errors were encountered: