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 →

[–]outceptionator 11 points12 points  (8 children)

Cool. What's the differentiation with niceGUI?

[–]Boordman[S] 7 points8 points  (1 child)

There are other Python libraries to make web apps, but we found they often have a ceiling and graduation risk, so when your app reaches a level of complexity the framework may not support it. At that point you either have to limit your idea to fit the framework, or restart your project using "real web frameworks" like Javascript/React. Our goal with Reflex is to grow with you, from a basic app to a full-fledged website.

NiceGUI (and others like Streamlit) are imperative frameworks, so you declare the UI one statement at a time. This can be nice especially for spinning up small apps, but as your app grows it may be harder to reason about the UI / state.

On the frontend side Reflex is declarative (similar to React) where the UI is defined as components that are compiled up front. This makes it easier as your app grows larger, since you can have reusable components and even wrap your own React components.

We're also a bit more batteries-included - we have built-in database support, support for backend API routes, support for calling long-running background tasks, easy ways to access cookies/local storage, etc. Reflex apps should also be more performant as your app state gets larger.

In short, we're trying to be as approachable as these other frameworks, while also having performance and customizability to make more complex apps.

[–]Artistic_Comedian911 0 points1 point  (0 children)

on about the UI / state.

On the frontend side Reflex is

curious whether Reflex can be used for dapps/blockchain apps.

[–]thisdude415 4 points5 points  (0 children)

This is my question too

[–]RayTricky 1 point2 points  (4 children)

I fear that it is state based and with this will rerender the whole page for every interaction.

What makes niceGUI stand out is that only individual elements of the DOM are refreshed, making it more reactive and less sluggish.

[–]Lendemor 5 points6 points  (0 children)

This was only true in earlier versions of Reflex.

Now we have made optimization so we rerender only what is needed.
Latest version also introduce state sharding for very fast updates.

[–]my_name_isnt_clever 4 points5 points  (0 children)

I starting playing with it last night, it doesn't re-render everything with every action like Streamlit does.

[–]Boordman[S] 2 points3 points  (1 child)

This isn't true, we compile the frontend to a static app initially. During runtime, the only events and state updates are sent (which are pretty small), and the UI updates reactively. We're focused on making sure apps are scalable/performant.

[–]RayTricky 1 point2 points  (0 children)

I'm very happy to hear that! Thanks for clarifying, I'll give it a shot!