Skip to content

Modularization concepts #3822

Closed Answered by rodja
MateoSaezMata asked this question in Q&A
Oct 2, 2024 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

If you visit the page again, only the function root() will be called again on the single object created by the MyPage() constructor call.

what is the concept which defines that a new instance of MyPage is created

Thats basic Python. NiceGUI does not do any magic re-evaluation of you whole program like Streamlit does. Hence the MainPage() is only called once (actually twice, because reload=True by default in ui.run).

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@MateoSaezMata
Comment options

@rodja
Comment options

Answer selected by MateoSaezMata
@MateoSaezMata
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #3821 on October 02, 2024 21:35.