mirror of
https://github.com/status-im/re-frame.git
synced 2025-02-22 14:58:12 +00:00
Experiment with FAQ formatting
This commit is contained in:
parent
8260e41c60
commit
781e7ca323
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
## Question
|
### Question
|
||||||
|
|
||||||
How can I inspect the contents of `app-db`? Perhaps from figwheel.
|
How can I inspect the contents of `app-db`? Perhaps from figwheel.
|
||||||
|
|
||||||
## Short Answer
|
### Short Answer
|
||||||
|
|
||||||
If at a REPL, inspect: `re-frame.db/app-db`.
|
If at a REPL, inspect: `re-frame.db/app-db`.
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ If at the js console, that's `window.re_frame.db.app_db.state`.
|
|||||||
You are [using clj-devtools](https://github.com/binaryage/cljs-devtools), right?
|
You are [using clj-devtools](https://github.com/binaryage/cljs-devtools), right?
|
||||||
If not, stop everything and immediately make that happen.
|
If not, stop everything and immediately make that happen.
|
||||||
|
|
||||||
## Better Answer
|
### Better Answer
|
||||||
|
|
||||||
Are you sure you need to?
|
Are you sure you need to?
|
||||||
|
|
||||||
@ -55,4 +55,5 @@ or
|
|||||||
You definitely have [clj-devtools](https://github.com/binaryage/cljs-devtools) installed now, right?
|
You definitely have [clj-devtools](https://github.com/binaryage/cljs-devtools) installed now, right?
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
Up: [FAQ Index](README.md)
|
Up: [FAQ Index](README.md)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
I use logging method X, how can I make re-frame use my method?
|
I use logging method X, how can I make re-frame use my method?
|
||||||
|
|
||||||
## Answer
|
### Answer
|
||||||
|
|
||||||
re-frame makes use of the logging functions: `warn`, `log`, `error`, `group` and `groupEnd`.
|
re-frame makes use of the logging functions: `warn`, `log`, `error`, `group` and `groupEnd`.
|
||||||
|
|
||||||
@ -22,3 +22,6 @@ override that by providing your own set or subset of these functions using
|
|||||||
:log my-log
|
:log my-log
|
||||||
...})
|
...})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
Up: [FAQ Index](README.md)
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
## Question
|
### Question
|
||||||
|
|
||||||
If I `dispatch` a js event object (from a view), it is nullified
|
If I `dispatch` a js event object (from a view), it is nullified
|
||||||
by the time it gets to the event-handler. What gives?
|
by the time it gets to the event-handler. What gives?
|
||||||
|
|
||||||
## Answer
|
### Answer
|
||||||
|
|
||||||
So there's two things to say about this:
|
So there's two things to say about this:
|
||||||
- if you want to `dispatch` a js event object to a re-frame
|
- if you want to `dispatch` a js event object to a re-frame
|
||||||
@ -15,3 +15,7 @@ So there's two things to say about this:
|
|||||||
and `dispatch` that, rather than the js event object itself. When you
|
and `dispatch` that, rather than the js event object itself. When you
|
||||||
`dispatch` pure, simple cljs data (ie. rather than js objects) testing
|
`dispatch` pure, simple cljs data (ie. rather than js objects) testing
|
||||||
and debugging will become easier.
|
and debugging will become easier.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
Up: [FAQ Index](README.md)
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
2. [How do I use logging method X](Logging.md)
|
2. [How do I use logging method X](Logging.md)
|
||||||
3. [Dispatched Events Are Null](Null-Dispatched-Events.md)
|
3. [Dispatched Events Are Null](Null-Dispatched-Events.md)
|
||||||
4.
|
4.
|
||||||
5.
|
|
||||||
6. [Why implement re-frame in `.cljc` files](Why-CLJC.md)
|
6. [Why implement re-frame in `.cljc` files](Why-CLJC.md)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
## Question
|
### Question
|
||||||
|
|
||||||
Why is re-frame implemented as `.cljc` file? Aren't ClojureScript
|
Why is re-frame implemented in `.cljc` files? Aren't ClojureScript
|
||||||
files meant to be `.cljs`?
|
files meant to be `.cljs`?
|
||||||
|
|
||||||
## Answer
|
### Answer
|
||||||
|
|
||||||
So tests can be run on both the JVM and the JS platforms,
|
So tests can be run on both the JVM and the JS platforms,
|
||||||
re-frame's implementation is mostly in `.cljc` files.
|
re-frame's implementation is mostly in `.cljc` files.
|
||||||
@ -16,4 +16,5 @@ Necessary interop for each platform can be found in
|
|||||||
See also: https://github.com/Day8/re-frame-test
|
See also: https://github.com/Day8/re-frame-test
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
Up: [FAQ Index](README.md)
|
Up: [FAQ Index](README.md)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user