Replies: 2 comments 1 reply
-
@B4PT0R there is |
Beta Was this translation helpful? Give feedback.
-
Some prior art: reflex/reflex/experimental/hooks.py Lines 80 to 93 in 9c7dbdb https://github.com/masenf/reflex-pomodoro/blob/main/reflex_pomodoro/components/use_state.py #2917 (comment) (similar to above, but with a small working example)
(Edit: oops, misread this and thought the code was going for browser-side state. At any rate, leaving it for potential inspo) |
Beta Was this translation helpful? Give feedback.
-
Hello,
Just discovered Reflex recently. Amazing piece of work here.
I've been lurking at the source code and played around with the framework to get to know its internal workings better.
Here is what I came up with :
Which successfully produces two stateful buttons with independent states.
The state is purely internal to the button and can't be referenced from outside.
Idk, maybe this has some relevance for some use cases where you just want to quickly use a state in a purely functional component.
Beta Was this translation helpful? Give feedback.
All reactions