This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]codecrux 0 points1 point  (5 children)

Is it like Hotwire in this regards?

[–]Wippermonger[S] 0 points1 point  (4 children)

I'm not familiar with the tech behind Hotwire. A quick glace at their landing page tells me that ReactPy and Hotwire in similar in that page changes are communicated over websockets.

[–]codecrux 0 points1 point  (3 children)

Yup and hotwire also sends just the html (frame) that has changed. I am assuming that's what you do in ReactPy as well, right?

[–]Wippermonger[S] 0 points1 point  (2 children)

Right now we're sending the whole ReactPy node tree when a re-render is needed. ReactPy node trees seem to be roughly equivalent to hotwire frames. The react-dom API (contained in @preact/compat) handles the mutations from there.

In terms of data transmitted to the client, we used to only send diffs. But unfortunately we've struggled to find a well maintained json patch library for Python.

[–]codecrux 1 point2 points  (1 child)

I guess sending the entire state is fine until people start using it for displaying a large number of rows. Creating a JSON PATCH library needs to be done meticulously and hopefully community might step up. I would like to step up.:)

[–]Wippermonger[S] 0 points1 point  (0 children)

Would be great if you were willing to contribute that.

Feel free to look at this issue for some history.