Skip to content

Instantly share code, notes, and snippets.

@steida
Created July 5, 2016 01:07
Show Gist options
  • Select an option

  • Save steida/817921c1911b9de30a73e2f1d8360cd6 to your computer and use it in GitHub Desktop.

Select an option

Save steida/817921c1911b9de30a73e2f1d8360cd6 to your computer and use it in GitHub Desktop.
Maybe it's time for the first Este abstraction.
// 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