Last active
March 3, 2016 10:21
-
-
Save mightybyte/e2d08f861aca79d12ab0 to your computer and use it in GitHub Desktop.
Small snippet illustrating the use of http://reply.obsidian.systems
This file contains 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-syntax elAttr | |
(syntax-rules () | |
((elAttr tag attrs children ...) | |
(eval-element 'tag 'attrs 'children ...)))) | |
(define-syntax el | |
(syntax-rules () | |
((el tag children ...) | |
(elAttr tag () children ...)))) | |
(el "h2" (text "Reflex Twitter")) | |
(el "div" (define x (textInput))) | |
(el "div" (define b (button "Tweet"))) | |
(define val (holdDyn "none" (mapEvent (lambda (e) (sampleDyn x)) b))) | |
(dynText val) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment