composables

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 1 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL