From 4f9bcc3608901907e2b31c9206dcede7225d2ef0 Mon Sep 17 00:00:00 2001 From: Intradiction Date: Wed, 26 Jul 2023 20:01:11 -0400 Subject: [PATCH] Update sensor-api.md There's a syntax typo in one of the examples, when I ran it it said moveDown is not a function of preDrag, I think you need to create the drag object and call the move functions there --- docs/sensors/sensor-api.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/sensors/sensor-api.md b/docs/sensors/sensor-api.md index eff8e3327..c7226aebe 100644 --- a/docs/sensors/sensor-api.md +++ b/docs/sensors/sensor-api.md @@ -80,9 +80,9 @@ function useMyCoolSensor(api: SensorAPI) { if (!preDrag) { return; } - preDrag.snapLift(); - preDrag.moveDown(); - preDrag.drop(); + const drag: SnapDragActions = preDrag.snapLift(); + drag.moveDown(); + drag.drop(); }, []); useEffect(() => {