Skip to content

Instantly share code, notes, and snippets.

@mrblueblue
Last active May 31, 2016 18:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrblueblue/3974e96142c42888489e8d846f345f49 to your computer and use it in GitHub Desktop.
Save mrblueblue/3974e96142c42888489e8d846f345f49 to your computer and use it in GitHub Desktop.
// JSX
<Form>
<Row>
<Input />
</Row>
</Form>
// React.createClass
React.createElement(Form, null,
React.createElement(Row, null,
React.createElement(Input, null)
)
)
// Functions
Form(Row(Input))
// Math
f(g(x))
compose(f, g)(x)
// Translate
const Connect = connect()
const WithState = withState()
compose(Connect, WithState(Element))
Connect(WithState(Element))
React.createElement(Connect, null,
React.createElement(WithState, null,
React.createElement(Element, null)
)
)
<Connect>
<WithState>
<Element />
</WithState>
</Connect>
compose(compose(WithContext, MapProps), WithState(Element))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment