Last active
December 20, 2015 02:00
-
-
Save cmoore/a34033658d691785c5a2 to your computer and use it in GitHub Desktop.
An example of the syntax.
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
(define-easy-handler (react-stuff :uri "/react/all") () | |
(send-react | |
(defvar panel (defreact | |
(json display-name "Panel" | |
component-will-mount (lambda () | |
;; (->) is (ps:chain) and (.>) bind()s 'this' to the block. | |
(something-with-a-callback (.> (lambda (x) (-> this (do-something))))) | |
render (lambda () | |
(rce "div" (json class-name "col-md-6") | |
(rce "div" (json class-name "panel panel-default panel-borders") | |
(rce "div" (json class-name "panel-heading") | |
(@ this props header)) | |
(rce "div" (json class-name "panel-body") | |
(@ this props body)))))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment