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

Is custom message passing possible? #70

Open
paddymul opened this issue Nov 19, 2024 · 0 comments
Open

Is custom message passing possible? #70

paddymul opened this issue Nov 19, 2024 · 0 comments

Comments

@paddymul
Copy link
Collaborator

paddymul commented Nov 19, 2024

I'm double checking. I see this https://github.com/widgetti/ipyreact?tab=readme-ov-file#events

and this bit from anywidget
https://anywidget.dev/en/jupyter-widgets-the-good-parts/#2-custom-messages

Are the two equivalent?

My widget overwhelmingly fits into the react/reactive model. I will be implementing lazy loading of data from python based on scrolling. I currently have that working via a convoluted react pattern where I memoize a cache, set args that are responded to in a later update of the element props. Then the cache is polled by the original scroll request. This is a mess obviously, and latent.

If I had access to the backbone model from the _esm exported function, I could implement what I'm thinking of.

So two questions:

  1. will your implementation of events accomodate this in the same way that anywidget does?
  2. what would you think of a "secret" extra prop of _model that allows these perversions of the react model?
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

1 participant