Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example of passing a Python function as props? #1

Open
gnestor opened this issue Nov 18, 2016 · 1 comment
Open

Example of passing a Python function as props? #1

gnestor opened this issue Nov 18, 2016 · 1 comment

Comments

@gnestor
Copy link

gnestor commented Nov 18, 2016

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.

@chelm
Copy link
Contributor

chelm commented Apr 14, 2017

Hey @gnestor i totally missed for the past several months. Yes this possible. I'll get an example of how added to the readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants