Open theasteve opened 11 months ago
package.json
{
"dependencies": {
"@headlessui/react": "^1.7.15",
"@heroicons/react": "^2.0.18",
"@rails/activestorage": "^7.0.6",
"@tailwindcss/forms": "^0.5.3",
"@uidotdev/usehooks": "^2.4.1-experimental.1",
"activestorage": "^5.2.8-1",
"antd": "^5.9.4",
"apexcharts": "^3.44.0",
"axios": "^1.4.0",
"dompurify": "^3.0.6",
"react": "^0.0.0-experimental-6c7b41da3-20231123",
"react-currency-input-field": "^3.6.11",
"react-dom": "^0.0.0-experimental-6c7b41da3-20231123",
"react-router-dom": "^6.14.0",
"tailwindcss": "^3.3.2"
},
"devDependencies": {
"autoprefixer": "^10.4.14",
"postcss": "^8.4.24",
"tailwindcss": "^3.3.2",
"vite": "^4.3.0",
"vite-plugin-ruby": "^3.2.0"
}
}
+1. Seeing this too in Vite/TS/React
Followed these install instructions: https://usehooks.com/usekeypress
+1
+1
Any solution for NextJS build ?
Same Error
Same error when I used useTimeout
(This hook is also "experimental" like useKeyPress
).
Seems like this is just a convenience/cosmetic api thing, so IIUC it could be solved by just removing the React.useEffectEvent = React.experimental_useEffectEvent;
line and replacing the references to React.useEffectEvent
with React.experimental_useEffectEvent
. Can we get someone to PR this change?
Hi there, I'm currently getting the following error when compiling with Vite.js
This is when I tried to install the useKeyPress. It seems as read from the error message
Imports are immutable in JavaScript. To modify the value of this import, you must export a setter function in the imported file (e.g. "setUseEffectEvent") and then import and call that function here instead.
Which is coming from the index.js files in the
node_modules/@uidotdev/usehooks/index.js
However, no setter function was provided in the docs. Any idea how I can solve?