static
vs .with_state
for shared state
#2269
jjangga0214
started this conversation in
General
Replies: 1 comment
-
depends on a global static var will make your code hard to understand and to test. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The docs shows examples of
.with_state
.But we may be able to use a
static
variable for shared state.Is there a benefit of using
.with_state
?Thanks.
Beta Was this translation helpful? Give feedback.
All reactions