setup

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Action

func Action[P any, A any, R any](
	s *corevango.SetupCtx[P],
	work func(context.Context, A) (R, error),
	opts ...corevango.ActionOption,
) *corevango.Action[A, R]

Action creates an action during Setup.

func Form

func Form[P any, T any](s *corevango.SetupCtx[P], initial T) *form.Form[T]

Form creates a form handler during Setup.

func GlobalSignal

func GlobalSignal[P any, T any](s *corevango.SetupCtx[P], initial T) *corevango.Signal[T]

GlobalSignal creates a global signal during Setup.

func Memo

func Memo[P any, T any](s *corevango.SetupCtx[P], compute func() T) *corevango.Memo[T]

Memo creates a local memo during Setup.

func OnChange

func OnChange[P any, K comparable](s *corevango.SetupCtx[P], key func() K, cb func(next, prev K))

OnChange registers a typed change handler during Setup.

func Resource

func Resource[P any, T any](s *corevango.SetupCtx[P], load func(context.Context) (T, error), opts ...corevango.ResourceOption) *corevango.Resource[T]

Resource creates a resource during Setup.

func ResourceKeyed

func ResourceKeyed[P any, K comparable, T any](
	s *corevango.SetupCtx[P],
	key func() K,
	load func(context.Context, K) (T, error),
	opts ...corevango.ResourceOption,
) *corevango.Resource[T]

ResourceKeyed creates a keyed resource during Setup.

func RouteForm added in v0.1.0

func RouteForm[P any, T any](s *corevango.SetupCtx[P], initial T) *routeForm[T]

RouteForm creates a form that submits through the current page Action.

func SharedSignal

func SharedSignal[P any, T any](s *corevango.SetupCtx[P], initial T) *corevango.Signal[T]

SharedSignal creates a session-scoped signal during Setup.

func Signal

func Signal[P any, T any](s *corevango.SetupCtx[P], initial T) *corevango.Signal[T]

Signal creates a local signal during Setup.

func URLParam

func URLParam[P any, T any](s *corevango.SetupCtx[P], key string, def T, opts ...urlparam.URLParamOption) *urlparam.URLParam[T]

URLParam creates a URL param binding during Setup.

Types

This section is empty.

Jump to

Keyboard shortcuts

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