Merge pull request #345 from pesterhazy/fix/docs

Use spaces, not tabs in code example
This commit is contained in:
Matthew Jaoudi 2018-02-27 03:13:37 +01:00 committed by GitHub
commit 0c4cc740c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 14 deletions

View File

@ -11,20 +11,20 @@ We'll start with a code fragment, because it is worth a 1000 words:
```cljs
(defn video-ui []
(let [!video (clojure.core/atom nil)] ;; stores the
(fn [{:keys [src]}]
[:div
[:div
[:video {:src src
:style {:width 400}
:ref (fn [el]
(reset! !video el))}]]
[:div
[:button {:on-click (fn []
(when-let [video @!video] ;; not nil?
(if (.-paused video)
(.play video)
(.pause video))))}
"Toogle"]]])))
(fn [{:keys [src]}]
[:div
[:div
[:video {:src src
:style {:width 400}
:ref (fn [el]
(reset! !video el))}]]
[:div
[:button {:on-click (fn []
(when-let [video @!video] ;; not nil?
(if (.-paused video)
(.play video)
(.pause video))))}
"Toogle"]]])))
```
Notes: