Skip to content

Client Side Python Components #110

Closed

Description

@rmorshea

Because of ReactPy's granular core abstractions it should be possible to run ReactPy client-side with Pyodide or PyScript. Using ReactPy instead of a solution that relies on a transpiler could have some advantages:

  • Components can be run client-side or server-side without any changes
  • No need to fiddle with weird bugs caused by back transpilation

ReactPy's client already uses React to render its JSON serializable VDOM into an actual view, so if the DOM representation were already client-side (as it would be with Pyodide) it should be trivial to send that representation to React directly rather than over a websocket.

Here is a functioning gist that uses ReactPy client-side via PyScript: https://gist.github.com/rmorshea/c888e6e34519edababf49351c63c335e

Activity

  1. added this to the milestone on Sep 3, 2019
  2. rmorshea commented on Apr 18, 2021

    @rmorshea
    CollaboratorAuthor

    Looks like #245 has been fixed. Maybe we can try this out?

  3. changed the title [-]Integrate iDOM with Pyodide[/-] [+]Integrate IDOM with Pyodide[/+] on Apr 21, 2021
  4. modified the milestones: , on Jan 11, 2022
  5. removed this from the milestone on Feb 21, 2023
  6. changed the title [-]Integrate IDOM with Pyodide[/-] [+]Integrate ReactPy with Pyodide[/+] on May 24, 2023
  7. changed the title [-]Integrate ReactPy with Pyodide[/-] [+]Support client-side components (with Pyodide)[/+] on Jun 16, 2023
  8. rmorshea commented on Jun 19, 2023

    @rmorshea
    CollaboratorAuthor

    Apparently NextJS's router manages to switch between client/server components fluidly.

  9. changed the title [-]Support client-side components (with Pyodide)[/-] [+]Client Side Python Components[/+] on Jul 10, 2023
  10. added
    priority-2-moderateShould be resolved on a reasonable timeline.
    and removed
    priority-3-lowMay be resolved one any timeline.
    on Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions