States in modules #1150
Unanswered
NanoscaleSimulations
asked this question in
Q&A
Replies: 1 comment 1 reply
-
After this PR merges, you will be able to define substates within a function. So what you will want to do is accept the main app Since ModalState and State are not part of the same inheritance tree, and ModalState isn't passed to the app, when your app is compiled, the frontend knows nothing about If you extend |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello there Pynecone community,
I am having trouble creating a module for my pynecone projects that can be used by simply importing and adding the component.
Basically, I want to create a module which contains a button, which shows a modal when pressed. I want to be able to use the same module for different projects.
However, I seem to have problems understanding how to make it work. It seems that the problem lies in the Modal State because it is in the module and not in the main script. Am I misunderstanding how States work? Or am I making some other dumb mistake?
The main file:
The module:
Error:
I appreciate any type of help and guidance. Thanx! 😄
Beta Was this translation helpful? Give feedback.
All reactions