Skip to content

Is custom message passing possible? #70

@paddymul

Description

@paddymul

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?

Metadata

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