How do I properly initialize component-internal state? #374
Replies: 1 comment 1 reply
-
I figured out how to do it. You can call |
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
-
When I use solara.use_reactive(init_val) to initialize the internal state of a component, everything works fine if initi_val are basic data types. But if init_val is an instance of a custom class, or a list of custom objects, solara goes into a death loop. I get something like the following message:
I managed to solve this by passing any more complicated initial state as an argument to the component, but that feels a bit ugly. What is the proper way to do this?
Beta Was this translation helpful? Give feedback.
All reactions