Skip to content

Support ref prop #1135

Open
Feature
@Archmonger

Description

@Archmonger

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority-2-moderateShould be resolved on a reasonable timeline.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions