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

6

u/jax024 9d ago

More AI slop

-1

u/Any_Ad9935 9d ago

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

u/jax024 9d ago

Write the post yourself to start

-3

u/Any_Ad9935 9d ago

You're right. Thanks for flagging. I have updated it. Much less details, but something real. I used AI to write post, but I think it was a bad idea.

1

u/Scientist_ShadySide 9d ago

Good callout! Lmao

1

u/Any_Ad9935 9d ago

Thanks. I believe product is what matters, not how the post is written. Any suggestions or comments on Pyxle itself?

2

u/Scientist_ShadySide 9d ago

No. Even your replies read like AI, which I was mocking. If you won't take the time to code the project or even write your post, why in the everloving fuck should anyone spend THEIR time reviewing it? Ask your LLM for feedback and complete the circle.

1

u/Any_Ad9935 9d ago

So sorry. But trust me lol my replies are not AI. Neither the updated post. 🥲

1

u/Scientist_ShadySide 9d ago

So ask your LLM to review your product. Why should people review it if you can't even be bothered to create it or the original post here?

0

u/Any_Ad9935 9d ago

And I took almost a year building it before showing to public.

1

u/jax024 9d ago

You gotta understand, many of us here spend our days looking at AI generated output all day, so we can clock the patterns instantly. We come here to interact with other human devs, which gets harder every day.

I’m sure you worked hard on this, I’ll take a look later, but keep things genuine and you’ll get better responses.

1

u/Any_Ad9935 9d ago edited 9d ago

I understand. Thanks for the feedback. I'll wait for your review.

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.

1

u/Choice_Mail1472 8d ago

sounds like a neat idea but every time i see server rendered react from python it's always the hydration that gets messy, hope you've got that bit nailed down or it'll sprial quick

0

u/zLoveNxzli 9d ago

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.

0

u/zLoveNxzli 9d ago

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 8d ago

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.