Documentation
¶
Overview ¶
Package duplex is a redux-like state management for bubbletea to build nice TUI.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Duplexer ¶
type Duplexer[S State] interface { // Dispatch dispatches an event to the store. Dispatch(actions Action) tea.Cmd }
Duplexer is the interface for the duplex state machine.
type StateChangeMsg ¶
type StateChangeMsg[S State] interface { // Prev gets the previous state of the store. Prev() S // Curr gets the current state of the store. Curr() S }
StateChangeMsg is a message that contains the.
func NewStateChangeMsg ¶
func NewStateChangeMsg[S State](prev, curr S) StateChangeMsg[S]
NewStateChangeMsg creates a new state change.
Click to show internal directories.
Click to hide internal directories.