widgetti / ipyreact

React for ipywidgets that just works. No webpack, no npm, no hassle
BSD 3-Clause "New" or "Revised" License
114 stars 8 forks source link

feat: events: call python methods from frontend #8

Closed maartenbreddels closed 1 year ago

maartenbreddels commented 1 year ago

We have a similar feature in ipyvue. Would be great if we can agree on this API with anywidget. cc @manzt

maartenbreddels commented 1 year ago

@kolibril13 what do you think? Should we merge this?

kolibril13 commented 1 year ago

How about a v0.3.0 release to ship this feature? :)

maartenbreddels commented 1 year ago

I want to have the set change in. I think for backwards compatibility we keep both on and set_, what do you think? But it requires some docs changes as well.

kolibril13 commented 1 year ago

Having _set in the next release sounds great! I think there are only very few people using ipyreact right now, so backwards compatibility is not too important in my opinion. Having both options available might cause more confusion than convenience. Another idea would be to have a deprecation warning when one tries to use on_.

maartenbreddels commented 1 year ago

See https://github.com/widgetti/ipyreact/pull/27

Do you have time to pick up the docs/example changes?

Btw, I hate breakage, even if 2 people use it :)

kolibril13 commented 1 year ago

Yep, just changed all the examples, and I think we are at least 3 people! :)

maartenbreddels commented 1 year ago

0.3 is out 🥳