Created
July 5, 2016 01:07
-
-
Save steida/817921c1911b9de30a73e2f1d8360cd6 to your computer and use it in GitHub Desktop.
Maybe it's time for the first Este abstraction.
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
| // React from este creates stateless component with immutable props check. | |
| import React, { title, fields } from 'este'; | |
| let HelloEste = ({ fields }) => | |
| <div> | |
| Hello Este! Some text: {fields.text.value} | |
| <input {...fields.text} /> | |
| </div>; | |
| HelloEste = title(HelloEste, 'Hello Este!'); | |
| HelloEste = fields(HelloEste, { | |
| path: 'HelloEste', | |
| fields: ['text'] | |
| }); | |
| export default HelloEste; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment