usehooks
usehooks copied to clipboard
useInterval: Cannot assign to import "useEffectEvent" using VITE
X [ERROR] Cannot assign to import "useEffectEvent"
node_modules/@uidotdev/usehooks/index.js:3:6:
3 │ React.useEffectEvent = React.experimental_useEffectEvent;
╵ ~~~~~~~~~~~~~~
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.
You're probably using React 19, as useEffectEvent has been released and is no longer an experimental feature. This package could be updated to support some of the experimental features from the experimental branch.