mirror of
https://github.com/status-im/re-frame.git
synced 2025-02-23 15:28:09 +00:00
Add new FAQ item
This commit is contained in:
parent
4ea108a9f4
commit
7e21264cd0
@ -1,6 +1,7 @@
|
||||
## Frequently Asked Questions
|
||||
|
||||
1. [How can I Inspect app-db?](Inspecting-app-db.md)
|
||||
2. [How can I use a subscription in an Event Handler](UseASubscriptionInAnEventHandler.md)
|
||||
2. [How do I use logging method X](Logging.md)
|
||||
3. [Dispatched Events Are Null](Null-Dispatched-Events.md)
|
||||
4. [Why implement re-frame in `.cljc` files](Why-CLJC.md)
|
||||
|
19
docs/FAQs/UseASubscriptionInAnEventHandler.md
Normal file
19
docs/FAQs/UseASubscriptionInAnEventHandler.md
Normal file
@ -0,0 +1,19 @@
|
||||
### 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
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user