Skip to content

Example of passing a Python function as props? #1

@gnestor

Description

@gnestor

Using jupyter-react, is it currently possible to do something like:

from mything import MyThing
from IPython.display import display

value = ''
def handleChange(event):
  value = event.target.value
mything = MyThing(props={
  'onChange': handleChange
})
display(mything)

I understand that jupyter-react does bi-directional comm between the kernel and front-end but I don't see any examples of how to use that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions