widgetti / widgetti/ipyreact

Is custom message passing possible?

Open
#70 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
134
Forks
9
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the ipyreact events documentation linked in the issue with anywidget’s custom-messages documentation. Determine whether the two mechanisms are equivalent and whether exposing a _model prop would support the proposed lazy-loading flow; done requires a maintainer decision on the API and implementation scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.