Skip to content

Commit 4781de2

Browse files
committed
docs(examples): update Bubble Tea examples to use new API
1 parent e9f399e commit 4781de2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/color/bubbletea/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ type model struct {
7070
aborted bool
7171
}
7272

73-
func (m model) Init() (tea.Model, tea.Cmd) {
73+
func (m model) Init() tea.Cmd {
7474
// Query for the background color on start.
7575
m.yes = true
76-
return m, tea.RequestBackgroundColor
76+
return tea.RequestBackgroundColor
7777
}
7878

7979
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {

examples/compat/bubbletea/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ type model struct {
6363
aborted bool
6464
}
6565

66-
func (m model) Init() (tea.Model, tea.Cmd) {
66+
func (m model) Init() tea.Cmd {
6767
m.yes = true
6868
m.styles = newStyles()
69-
return m, nil
69+
return nil
7070
}
7171

7272
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {

0 commit comments

Comments
 (0)