Exemple #1
0
Fichier : views.go Projet : kego/ke
func New(ctx context.Context, self flux.ViewInterface) *View {
	app := stores.FromContext(ctx)
	return &View{
		View: flux.NewView(ctx, self, app),
		App:  app,
	}
}
Exemple #2
0
func NewTestView(ctx context.Context, app flux.AppInterface, watch bool) *TestView {
	v := &TestView{}
	v.View = flux.NewView(ctx, v, app)
	if watch {
		v.Watch("a", notif1{})
	}
	return v
}