bubbletea icon indicating copy to clipboard operation
bubbletea copied to clipboard

docs: creating nested models

Open bashbunni opened this issue 2 years ago • 5 comments

Changes:

  • [x] add info on working with nested models
  • [x] add docs folder

bashbunni avatar Jun 17 '22 19:06 bashbunni

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?

maaslalani avatar Jul 01 '22 16:07 maaslalani

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

bashbunni avatar Jul 13 '22 16:07 bashbunni

Looks awesome @bashbunni !!!

maaslalani avatar Jul 13 '22 16:07 maaslalani

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.

bashbunni avatar Aug 05 '22 16:08 bashbunni

This example no longer manages state from a main model. That is shown in the composable-view branch.

bashbunni avatar Aug 10 '22 17:08 bashbunni