From 781e7ca323180fa37674bbaa9dfdfc0f06343940 Mon Sep 17 00:00:00 2001 From: Mike Thompson Date: Mon, 29 Aug 2016 23:06:41 +1000 Subject: [PATCH] Experiment with FAQ formatting --- docs/FAQs/Inspecting-app-db.md | 7 ++++--- docs/FAQs/Logging.md | 5 ++++- docs/FAQs/Null-Dispatched-Events.md | 8 ++++++-- docs/FAQs/README.md | 1 - docs/FAQs/Why-CLJC.md | 7 ++++--- 5 files changed, 18 insertions(+), 10 deletions(-) diff --git a/docs/FAQs/Inspecting-app-db.md b/docs/FAQs/Inspecting-app-db.md index e4b44f4..275c0bd 100644 --- a/docs/FAQs/Inspecting-app-db.md +++ b/docs/FAQs/Inspecting-app-db.md @@ -1,9 +1,9 @@ -## Question +### Question 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`. @@ -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? If not, stop everything and immediately make that happen. -## Better Answer +### Better Answer 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? +--- Up: [FAQ Index](README.md)       diff --git a/docs/FAQs/Logging.md b/docs/FAQs/Logging.md index c0bab11..3cb7a6b 100644 --- a/docs/FAQs/Logging.md +++ b/docs/FAQs/Logging.md @@ -2,7 +2,7 @@ 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`. @@ -22,3 +22,6 @@ override that by providing your own set or subset of these functions using :log my-log ...}) ``` + +--- +Up: [FAQ Index](README.md)       diff --git a/docs/FAQs/Null-Dispatched-Events.md b/docs/FAQs/Null-Dispatched-Events.md index 87708fb..a0e939e 100644 --- a/docs/FAQs/Null-Dispatched-Events.md +++ b/docs/FAQs/Null-Dispatched-Events.md @@ -1,9 +1,9 @@ -## Question +### Question If I `dispatch` a js event object (from a view), it is nullified by the time it gets to the event-handler. What gives? -## Answer +### Answer So there's two things to say about this: - 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 `dispatch` pure, simple cljs data (ie. rather than js objects) testing and debugging will become easier. + + +--- +Up: [FAQ Index](README.md)       diff --git a/docs/FAQs/README.md b/docs/FAQs/README.md index 81d8606..8ca2e76 100644 --- a/docs/FAQs/README.md +++ b/docs/FAQs/README.md @@ -4,7 +4,6 @@ 2. [How do I use logging method X](Logging.md) 3. [Dispatched Events Are Null](Null-Dispatched-Events.md) 4. -5. 6. [Why implement re-frame in `.cljc` files](Why-CLJC.md) diff --git a/docs/FAQs/Why-CLJC.md b/docs/FAQs/Why-CLJC.md index 9dd694e..1397dbc 100644 --- a/docs/FAQs/Why-CLJC.md +++ b/docs/FAQs/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`? -## Answer +### Answer So tests can be run on both the JVM and the JS platforms, 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 +--- Up: [FAQ Index](README.md)