Open denisvely opened 2 years ago
Hi @denisvely! Feel free to open a PR for this change and I will make sure it gets reviewed ASAP.
Can't create PR, no button, fix the package.json with beneath. Don't like to nag, but very, very small fix tho. It would have taken you less time fixing it, then answering the question itself and keeping it uninstallable for a couple of months.
{
"name": "@svanboxel/visibility-sensor-react-native",
"version": "1.0.1",
"description": "React Native component that helps with determining whether a component is in the viewport.",
"main": "dist/index.js",
"module": "dist/index.esm.js",
"types": "dist/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/SvanBoxel/visibility-sensor-react-native.git"
},
"scripts": {
"build": "rollup -c",
"build-watch": "rollup -c -w",
"test": "npm run lint",
"prepare": "npm run build",
"prepublishOnly": "npm run lint",
"lint": "prettier -c --config .prettierrc 'src/**/*.tsx'",
"lint:fix": "prettier --config .prettierrc 'src/**/*.tsx' --write",
"version": "npm run format && git add -A src",
"postversion": "git push && git push --tags"
},
"keywords": [
"React Native",
"React",
"Visibility",
"Visbility sensor",
"Viewport"
],
"author": "",
"license": "ISC",
"devDependencies": {
"@types/react-native": ">=0.62.0 ",
"prettier": "^2.0.5",
"rollup": "^1.25.0",
"rollup-plugin-typescript2": "^0.24.3",
"typescript": ">=3.9.3"
},
"peerDependencies": {
"react": ">= 16.9.0",
"react-native": "^0.62.0"
},
"typings": "dist/index.d.ts",
"files": [
"dist"
],
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
}
}
Can't create PR, no button, fix the package.json with beneath.
Thank you. You should really be able to create a PR from a fork. Multiple people have done it before you.
Don't like to nag, but very, very small fix tho. It would have taken you less time fixing it, then answering the question itself and keeping it uninstallable for a couple of months.
Disagree. Compatibility with new React versions needs to be tested as well, which I unfortunately don't have time for at the moment. Thank you for sharing the updated package.json. If time allows it, could you please test this and create a PR? Thanks in advance @mfik. 🙇🏽
i hope this gets fixed soon! I need it for my project :(
@davidphamm Just use a flatlist with : https://reactnative.dev/docs/flatlist#onviewableitemschanged
I am having trouble getting it to work with FlatList and was wondering if you could help me?
@davidphamm @mfik's suggestion could indeed work for you. I still don't have the workload to maintain this repository so likely I'll archive it unless people like to contribute of course.
While installing I got an error:
npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: npm ERR! Found: react@17.0.1 npm ERR! node_modules/react npm ERR! react@"17.0.1" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.9.0" from @svanboxel/visibility-sensor-react-native@1.0.2 npm ERR! node_modules/@svanboxel/visibility-sensor-react-native npm ERR! @svanboxel/visibility-sensor-react-native@"*" from the root project