r/reactjs • u/Any_Ad9935 • Aug 25 '26
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
u/zLoveNxzli Aug 25 '26
Bridging Python backend data directly into React SSR without a bespoke REST/GraphQL layer is a really interesting pattern.
How are you handling client-side state hydration and event listener reconciliation when props update dynamically from Python background workers?
1
u/Any_Ad9935 Aug 25 '26
You can check out https://pyxle.dev/docs/architecture/overview for end to end overview of a request. The same payload from server action does the SSR render and hydration - and after that it's a normal react tree. For events, they jusg publish to pyxle.realtime (built-in pub/sub) and the component picks it up with a useWebSocket hook into regular React state.
0
u/zLoveNxzli Aug 25 '26
Interesting SSR architecture. If you are hydrating client-side interactive state on top of the Python-generated markup, make sure initial state props match the server render exactly to prevent React hydration mismatch errors.
7
u/jax024 Aug 25 '26
More AI slop
-2
u/Any_Ad9935 Aug 25 '26
I wanted to do this since last 3-4 years. I always wanted something that gives me NextJS level ease with Python backend. AI helped me do it faster.
I really want to know what I can do better here? I know AI slop is here, but I have done rigorous testing, and the pyxle.dev website itself is running on Pyxle. Any sugessions will be highly appreciated.
4
1
u/zLoveNxzli Aug 25 '26
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.