mirror of
https://github.com/status-im/re-frame.git
synced 2025-02-24 15:58:36 +00:00
20 lines
350 B
Markdown
20 lines
350 B
Markdown
|
### Question
|
||
|
|
||
|
How do I access the value of a subscription from inside an event handler?
|
||
|
|
||
|
### Short Answer
|
||
|
|
||
|
You shouldn't.
|
||
|
|
||
|
Philosophically: subscriptions are designed to deliver "a stream" of new values
|
||
|
over time. Within an event handler, we only need a one off value.
|
||
|
|
||
|
Operationally: you'll end up with a memory leak.
|
||
|
|
||
|
### Longer Answer
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|