Skip to content

Add offline fallback to component template tags. #195

@Archmonger

Description

@Archmonger

Current Situation

Currently there is no way for the developers to gracefully handle websocket disconnections within ReactPy.

This results in an awkward situation where a page can be non-interactive due to a WebSocket disconnection, but visually looks completely normal.

Proposed Actions

Add an offline = <dotted_path> fallback to the component template tag.

This component will be non-interactive and is pre-rendered onto the page within a <component-uuid>-offline div. This div will be displayed when the websocket disconnects.

The interface will likely look like this:

{% "my.normal.component" offline="my.offline.fallback.component" %}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions