Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CounterComposable ¶
type CounterComposable struct {
Count *bubbly.Ref[int]
Increment func()
Decrement func()
Reset func()
IsEven *bubbly.Computed[interface{}]
}
CounterComposable encapsulates counter logic (Vue-like composable)
func UseCounter ¶
func UseCounter(ctx *bubbly.Context, initial int) *CounterComposable
UseCounter creates a reusable counter with reactive state This demonstrates the composable pattern - reusable logic that can be shared across components, similar to Vue's Composition API
Click to show internal directories.
Click to hide internal directories.