Skip to content

Reacts role in the frontend and architecture #973

Answered by Archmonger
saolof asked this question in Question
Discussion options

You must be logged in to vote

I'll provide TLDR answers:

  1. Pretty much. There's a few extra things occurring to facilitate that though.
  2. Yes, but we use Preact instead of ReactJS. It is primarily used for updating the client DOM.
  3. Yes. To oversimplify, all things Python stay in Python. Python creates the VDOM trees and keeps track of hook states. The front end is used to display the rendered results.
  4. All ReactPy communication currently occurs via websockets. When an event is triggered, the client notifies the server that an event has occurred. That event gets handled by the registered Python event handler. For efficiency, this process only occurs if you registered an event handler in ReactPy for that event type.
    • For cro…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rmorshea
Comment options

Answer selected by Archmonger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants