Skip to content

Commit 42b9988

Browse files
author
Pepper Pancoast
committed
Fix useEffect syntax error in conditional dragging example
Addresses #224 Fixed incorrect useEffect syntax in the conditional dragging documentation. Changed: useEffect({ To: useEffect(() => { useEffect expects a callback function as its first argument, not an object.
1 parent 26ded57 commit 42b9988

File tree

1 file changed

+1
-1
lines changed
  • packages/documentation/constellation/05-core-package/00-adapters/00-element

1 file changed

+1
-1
lines changed

packages/documentation/constellation/05-core-package/00-adapters/00-element/about.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function noop(){};
159159
function Item({isDraggingEnabled}: {isDraggingEnabled: boolean}) {
160160
const ref = useRef();
161161

162-
useEffect({
162+
useEffect(() => {
163163
// when disabled, don't make the element draggable
164164
// this will allow a parent draggable to still be dragged
165165
if(!isDraggingEnabled) {

0 commit comments

Comments
 (0)