Skip to content
Discussion options

You must be logged in to vote

@TaiJuWu the State attribute is a BaseVar when it is accessed from the class, i.e. State.test. This is used when creating the frontend: the actual value is in the state dict on the client side and will be filled in by the BaseVar at runtime.

The value contains the actual list when it is accessed from the instance, i.e. from an event handler. This is called when some client interaction triggers an event on the state. Within the event handler, accessing self.test will get the real list value, not the BaseVar.

In the context where you have a reference to the State class, during compile time, it doesn't make any sense to access the actual value, because the page is compiled for all clients, b…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@TaiJuWu
Comment options

Answer selected by TaiJuWu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants