Add new FAQ item

This commit is contained in:
Mike Thompson 2017-01-07 10:33:01 +11:00
parent 4ea108a9f4
commit 7e21264cd0
2 changed files with 20 additions and 0 deletions

View File

@ -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)

View 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