Warning: useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client. See https://reactjs.org/link/uselayouteffect-ssr for common fixes.
in index.js
React.useLayoutEffect(() => {
let offset = { x: null, y: null }
let speed = { x: 0, y: 0 }
let lastLocation = { x: 0, y: 0, time: new Date().getTime() }
let mouseIsClicked = false
How can I adjust this to get around this warning, please
My package.json
...
"dependencies": {
"@popperjs/core": "^2.9.0",
"@tailwindcss/postcss7-compat": "^2.0.2",
"autoprefixer": "^9",
"axios": "^0.21.1",
"dotenv": "^8.2.0",
"isomorphic-unfetch": "^3.1.0",
"next": "10.0.5",
"next-images": "^1.7.0",
"popper.js": "1.15.0",
"postcss": "^8.1.4",
"react": "17.0.1",
"react-accessible-accordion": "^3.3.4",
"react-awesome-reveal": "^3.7.1",
"react-collapsible": "^2.8.3",
"react-dom": "17.0.1",
"react-icons": "^4.2.0",
"react-responsive": "^7",
"react-tabs": "^3.2.0",
"react-tinder-card": "^1.3.1",
"react-transition-group": "^4.4.1",
"sass": "^1.32.5",
"swr": "^0.5.3"
},
"devDependencies": {
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-import": "^14.0.0",
"postcss-preset-env": "^6.7.0",
"precss": "^4.0.0",
"tailwindcss": "npm:@tailwindcss/postcss7-compat"
}
}...