Skip to content

Add support for ipyreact #160

Open
Open

Description

  • shinywidgets version: 0.3.3
  • Python version: 3.9
  • Operating System: mac osx

Description

Currently, I'm using ipyreact to create interactive tables in reactable-py. ipyreact is built on Anywidget, and I noticed there's quak support here, but I was unable to get ipyreact react to work 😓 .

What I Did

Note that in the express app below, I could see a div prepared for the widget, but no content:

from shiny.express import ui, render
from ipyreact import Widget
from shinywidgets import render_widget


@render_widget
def out():
    return Widget(_type="button", children=["click me"], events={"onClick": print})

I double checked some of the shinywidgets._dependency pieces, and it looks like it's finding / loading the necessary javascript. However, I'm not what might be different about ipyreact here 😬

edit: updated example to import ipyreact first. importing after shiny widgets was causing an error (see #163)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions