HN user

picklelo

492 karma

nikhil@reflex.dev

Posts4
Comments36
View on HN

Thanks! we found script-like frameworks like Streamlit are nice for small apps, but hard to reason about for larger apps. We went with a declarative approach more similar to React.

FastAPI has been working well for us, but we're not strongly coupled to it - in the future it would be easy to swap it out if needed.

We need to compile down to React/HTML in the end as it's the only way to render a webpage. By "pure Python" we meant from the developer's perspective they won't have to touch React or Javascript.

We only use React for the UI layer and to send events. Since all the state/logic is kept in Python you won't see Javascript errors during runtime, and debugging can mostly be done in Python land.

Keeping the state on the server allows us to run arbitrary Python code and libraries in our event handlers that update the state. Currently only the ui is compiled to React but the logic stays in Python.

We’re working to offload more logic to the client in the for purely UI operations like you mention, and in the future want to leverage wasm once it’s more mature.

Cofounder of Pynecone here - thanks for the feedback. We’re prioritizing improving our docs and example apps in the upcoming weeks and will have a ChatGPT clone example. Definitely want to improve the onboarding experience and showcase these more complex use cases.

I've used some of these in the past and they're easy to get started with, but I found limitations in terms of components, styling, and performance. Since we compile down to a NextJS app, we aim to have the flexibility of traditional webdev with the ergonomics of Python

Yup, our frontend is just a wrapper around React so it is fully declarative. We are definitely more opinionated than something like Flask, but the benefit is that you can write your whole app, including the frontend, in a single language (for small apps just a single file).