Last active
September 18, 2020 08:05
-
-
Save daiyi/62db9d22136503a42cbbe5dc5ec0337d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns instructions.core | |
(:require [reagent.core :as reagent] | |
[re-frame.core :as re-frame])) | |
(defn info [] | |
[:div {:style {:max-width 500}} | |
[:h1 "re-playground"] | |
[:p "code is livereloaded. | |
this right-hand panel has the id 'app'. | |
to render reagent into this panel, target this element with " | |
[:code "(js/document.getElementById 'app')"] | |
". see the " | |
[:a {:href "?gist-id=daiyi/6ca3d5fd72c3d79b3f1e77cb754006b5"} "examples"] | |
"!"] | |
[:h2 "load from gist"] | |
[:p "to easily share re-frame sketches, you can save your code to a " | |
[:a {:href "https://gist.github.com"} "github gist"] | |
" and load it into this editor with the url param: " | |
[:code "gist-id=[github-username]/[gist-id]"]] | |
[:p "for example: " [:a {:href "?gist-id=daiyi/62db9d22136503a42cbbe5dc5ec0337d"} "?gist-id=daiyi/62db9d22136503a42cbbe5dc5ec0337d"]]]) | |
;; This renders the app to the right-hand panel | |
(reagent/render | |
[info] | |
(js/document.getElementById "app")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I see your the demos on re-playground is break since Reagent use now
reagent.dom
namespace for the render function.Can you update your two gist ?
My fork : https://gist.github.com/PrestanceDesign/29a2c419feed735c1ae75e906dad5a0d
Cheers.