DioxusLabs/dioxus · error

todo: convert_visible_data in dioxus-native. requires suppor

Error message

todo: convert_visible_data in dioxus-native. requires support in blitz

What it means

Like the other event stubs in dioxus-native, convert_visible_data is an unimplemented!() placeholder: blitz does not yet emit visibility events, so the converter cannot produce VisibleData. If a visibility event reaches the VirtualDOM under the native renderer, this panic fires during event conversion.

Source

Thrown at packages/native-dom/src/events.rs:138

    fn convert_touch_data(&self, event: &PlatformEventData) -> TouchData {
        event.downcast::<NativeTouchData>().unwrap().clone().into()
    }

    fn convert_transition_data(&self, _event: &PlatformEventData) -> TransitionData {
        unimplemented!("todo: convert_transition_data in dioxus-native. requires support in blitz")
    }

    fn convert_wheel_data(&self, event: &PlatformEventData) -> WheelData {
        event.downcast::<NativeWheelData>().unwrap().clone().into()
    }

    fn convert_resize_data(&self, _event: &PlatformEventData) -> ResizeData {
        unimplemented!("todo: convert_resize_data in dioxus-native. requires support in blitz")
    }

    fn convert_visible_data(&self, _event: &PlatformEventData) -> VisibleData {
        unimplemented!("todo: convert_visible_data in dioxus-native. requires support in blitz")
    }
}

#[derive(Clone)]
pub struct NodeHandle {
    pub(crate) doc: Rc<RefCell<BaseDocument>>,
    pub(crate) node_id: NodeId,
}

impl NodeHandle {
    pub fn node_id(&self) -> NodeId {
        self.node_id
    }

    pub fn doc(&self) -> Ref<'_, BaseDocument> {
        self.doc.borrow()
    }

View on GitHub (pinned to 393d190a80)

Solutions

  1. Remove or cfg-gate the onvisible handler when targeting dioxus-native
  2. Approximate visibility with scroll events (convert_scroll_data is implemented) or element geometry via NodeHandle
  3. Run that part of the UI on the web or desktop renderer where visibility events work
  4. Upgrade dioxus-native once blitz implements visibility events and the converter stops being a stub
Defensive patterns

Strategy: fallback

Validate before calling

fn supports_visibility_events() -> bool {
    cfg!(any(target_arch = "wasm32", feature = "desktop")) // not supported on dioxus-native
}

Type guard

fn supports_visibility_events() -> bool {
    cfg!(any(target_arch = "wasm32", feature = "desktop"))
}

Prevention

When it happens

Trigger: Using the onvisible event handler (IntersectionObserver-style visibility callbacks) in an app rendered by dioxus-native; the conversion from PlatformEventData to VisibleData hits the stub.

Common situations: Copying web code that uses onvisible for lazy loading or scroll-reveal into a native (blitz) app; upgrading a project to a renderer configuration that routes visibility events through NativeConverter.

Related errors


AI-assisted analysis of DioxusLabs/dioxus@393d190a80 (2026-08-16). Data as JSON: /api/errors/b375164a82e9c9df. Report an issue: GitHub.