Replies: 2 comments
-
All event handlers need to be declared inside a State (or substate) so they can interact with the Vars inside this same state. In your case, you should have :
Also, If I'm not wrong, on change already provide the changed value
TLDR : any method that modify a value in a State should belong to said State. |
Beta Was this translation helpful? Give feedback.
-
Thanks for that....I am learning and trying to wrap my head around this framework paradigm and the rules of the game. Yeah, you may be right about the changed value v, but I am about to pass additional arguments to the update_air function. |
Beta Was this translation helpful? Give feedback.
-
The code below yields the error in the title.
Can somebody please help? explain?
I am sure you are going to question the structure of the program and wonder why I am not taking advantage of Pynecone intrinsic setters of state variables, etc. ....well, there is a reason, but I don't think that matters at this moment...if you think if does and need to know, I can explain; otherwise...
...if seems to me the code below is rather harmless and I don't understand why Pynecone thinks the lambda v function argument is a BaseVar and not just some string coming out of the number_input component.
Beta Was this translation helpful? Give feedback.
All reactions