bubbletea
bubbletea copied to clipboard
docs: creating nested models
Changes:
- [x] add info on working with nested models
- [x] add docs folder
I would suggest we should maybe make an example/nested-model
instead as code is likely much easier to maintain than documentation as breaking API changes / evolution (i.e. introducing bubbles/navigation
) comes it's very likely this example will be out of date in a few months but having that code not compile will make it easier to maintain and we can explain concepts in the comments of the example. What do you think @bashbunni?
hey @maaslalani great suggestion. I actually found some typos while moving the code over to an example :joy: what do you think about these changes? I feel like these docs will become more substantial as we get more questions and as we get feedback. Just pushed the latest changes
Looks awesome @bashbunni !!!
tbd in dev meeting. I'd like some feedback on writing effective comments in the code and whether or not this example should use tea.Batch
or return commands. I feel like returning commands makes the flow a bit more obvious, but using tea.Batch
is the cleaner solution. I can make this PR a single commit as well if that's preferred.
This example no longer manages state from a main model. That is shown in the composable-view
branch.