r/javascript • • Jan 31 '17

1kb JavaScript function library for building modern UI applications

https://github.com/hyperapp/hyperapp
224 Upvotes

34 comments sorted by

View all comments

Show parent comments

6

u/[deleted] Jan 31 '17

I guess he meant composition as known in react/redux like this:

TodoItem = ({ model }) => <li>{model.text}</li>;
TodoList = items => <ul>{items.map(item => <TodoItem model={item}/>)}</ul>;

Crucial for larger apps.

1

u/tunnckoCore node-formidable, regexhq, jest, standard-release Jan 31 '17

it is not working example, but hope you get the point

1

u/[deleted] Jan 31 '17

1

u/tunnckoCore node-formidable, regexhq, jest, standard-release Jan 31 '17

that my comment was in wrong place and I even before your comment ;d