In the documentation of draggable, under the conditional dragging section, there's an error with usage of useEffect :
useEffect receives a callback as first argument, so the following code (from the documentation) is incorrect:
useEffect({
// when disabled, don't make the element draggable
// ...
}, []);
This is correct:
- useEffect({
+ useEffect(() => {
// when disabled, don't make the element draggable
// ...
}, []);
In the documentation of
draggable, under the conditional dragging section, there's an error with usage ofuseEffect:useEffectreceives a callback as first argument, so the following code (from the documentation) is incorrect:This is correct: