-
-
Notifications
You must be signed in to change notification settings - Fork 328
Support ref prop #1135
Copy link
Copy link
Open
Labels
priority-2-moderateShould be resolved on a reasonable timeline.Should be resolved on a reasonable timeline.
Metadata
Metadata
Assignees
Labels
priority-2-moderateShould be resolved on a reasonable timeline.Should be resolved on a reasonable timeline.
Type
Fields
Give feedbackNo fields configured for Feature.
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 ause_messengerhook 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.