Last active
March 15, 2017 10:12
-
-
Save mazikwyry/63d6a0ca02393978ac52771a2300b2ce 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
| class HelloWorld < React::Component::Base | |
| param :time, type: Time | |
| render do | |
| p do | |
| span { "Hello, " } | |
| input(type: :text, placeholder: "Your Name Here") | |
| span { "! It is #{params.time}"} | |
| button(type: :button) { "login!" }.on(:click) do | |
| login! | |
| end if valid_new_input? | |
| end | |
| end | |
| end | |
| every(1) do | |
| Element["#example"].render do | |
| HelloWorld(time: Time.now) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment