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

Support ref prop #1135

Open
Archmonger opened this issue Aug 25, 2023 · 1 comment
Open

Support ref prop #1135

Archmonger opened this issue Aug 25, 2023 · 1 comment
Labels
priority-2-moderate Should be resolved on a reasonable timeline. type-feature About new capabilities

Comments

@Archmonger
Copy link
Contributor

Archmonger commented Aug 25, 2023

Original discussion: #1134
cc: @slauko

Current Situation

With several tags such as canvas, ReactJS will "fill in" the context into the ref=... you provide. We currently do not have an equivalent feature in ReactPy. Currently, all props provided to ReactPy are serialized and sent to the client as-is.

Currently we have no mechanism that would enable ReactJS/ReactPy to intelligently "fill in" this ref. To add compatibility for this feature, ReactPy would need to start treating reactpy.html.canvas["ref"] as a unique prop.

Proposed Actions

In all likelihood, creating an equivalent API to ReactJS <canvas ref=... /> would rely on our future plans for a use_messenger hook to allow for arbitrary client->server real-time communication.

There's also a chance we develop this fully server-sided, but that's probably not technologically feasible.

@Archmonger Archmonger added type-feature About new capabilities priority-2-moderate Should be resolved on a reasonable timeline. labels Aug 25, 2023
@elro444
Copy link
Contributor

elro444 commented Oct 3, 2023

I second this. It would be really nice to have this feature in ReactPy as well :)

@Archmonger Archmonger changed the title Support html.canvas["ref"] prop Support ref prop Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-2-moderate Should be resolved on a reasonable timeline. type-feature About new capabilities
Projects
None yet
Development

No branches or pull requests

2 participants