Component composition
stephanebisson opened this issue · comments
Is there a way to do component composition, defining smaller components to be used within larger components?
For example, is it currently possible to refactor the To-do app into a structure of components like this, each with its own rendering logic and events handling:
- TodoApp
- TodoList
- TodoItem
- TodoForm
- TodoList
No there's not (by design). You can use nested functions that return HTML strings to provide a bit more structure to your code if you'd like, but this library is deliberately different from how something like Vue or React might handle UI.