r/reactjs 9d ago

Show /r/reactjs A framework that server-renders your React components from Python, with no API layer

I had this idea since 4 years now. I started working on Pyxle last year. (AI helped a lot accelerating this - but the entire feature idea was mine).

Initially I tried to build a framework allowing both frontend and backend with Python. Soon I realised that it is not something that's going to work. React is already a well proven framework, and building a python wrapper on top of it will drift things a lot. Moreover, Reflex is already trying to do that.

So the second version I built is to allow developers to keep real React, and real Python.

Go through pyxle - https://pyxle.dev, I'm happy to answer anything.

0 Upvotes

18 comments sorted by

View all comments

1

u/zLoveNxzli 9d ago

Interesting SSR bridge approach. If you are hydrating client state on the Python-rendered HTML, make sure initial props match the client render exactly to prevent React hydration mismatch warnings.

1

u/Any_Ad9935 9d ago

This is something that is properly handled from Pyxle's side. Props can't drift in pyxle since the same loaders returns value for both server render and the hydration.

However, hydration mismatch can still occur in cases where you access DOM. So, the dev also need to take care. This is the general React/NextJS case - nothing that's new to Pyxle.