Skip to main content

Module state

Module state 

Source
Expand description

The shared drag state. One DndContext<T> lives in Dioxus context and is read/written by Draggable and DropZone components (and by you, if you wire events manually).

Payloads travel through this Rust-side store - not through the browser’s DataTransfer - so they can be any Clone type with zero serialization. (DataTransfer interop for external drags lives in crate::external.)

State is held in a Store, Dioxus 0.8’s fine-grained reactivity primitive: each field gets its own lazy subscription. A component that reads dnd.over() in its render only reruns when the hovered zone changes - not on every pointer move.

Structs§

DndContext
Handle to the shared drag state. Cheap to copy - it’s just a store key.
DragState
A snapshot of an in-flight drag.
DragStateStoreTransposed

Traits§

DragStateStoreExt