Hi there,
I am wanting to add this scrolling feature to my website:
I have not used React before so not sure how I actually include it in my page.
I have done the following:
Installed React and ReactDOM
npm install react react-dom
I can see React in the node modules folder
I have then run:
npm install react react-dom@latest
I’ve added the dependency to the package.json file which now looks like this:
{
"name": "new",
"version": "1.0.0",
"description": "",
"main": "gruntfile.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"grunt": "^1.6.1",
"grunt-contrib-sass": "^2.0.0",
"grunt-contrib-watch": "^1.1.0"
},
"dependencies": {
"matter-js": "^0.19.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"dependencies": {
"react-infinite-scroll-animation": "^1.0.0"
}
}
I’ve now got to a part that suggests doing this:
import InfiniteLoopSlider from "react-infinite-scroll-animation";
But get an error when running this in cmd.
Can anyone help with what I have done wrong or what I need to do now?
Thanks!