Releases: maxence-charriere/go-app
Releases · maxence-charriere/go-app
v10.0.9
v10.0.8
v10.0.7
Summary
- PWA updates fixed
v10.0.6
Changes
- Fixed a bug in the Raw element where the parent was not set during updates.
v10.0.5
Service worker is handled once the page is loaded.
v10.0.4
v10.0.3
v10.0.2
Fix a bug where the app's installable state is not set when the event occurs before the WASM is loaded.
v10.0.1
Update dependencies.
v10.0.0
Go-app v10.0.0 is out!
Install
go get -u github.com/maxence-charriere/go-app/v10
Changelog
General
- The engine has been rewritten to be more maintainable and efficient.
.wasm
updates are now better handled, addressing cases where the service worker is updated before the .wasm file is loaded.
Route
Route
functions now take afunc() app.Composer
parameter:app.Route("/hello", func() app.Composer{ return &helloCompnent{} })
RouteFunc
functions have been removed.- The previous
Route
behavior can be reproduced byusing app.NewZeroComponentFactory
as the Route parameter:app.Route("/hello", app.NewZeroComponentFactory(&helloCompnent{}))
Conditions
app.If
,app.ElseIf
andapp.Else
now take functions:app.If(true, func() app.UI{ return app.Text("true") })
- Added
app.IfSlice
,app.ElseIfSlice
andapp.ElseSlice
to handle cases where a function needs to return[]app.UI
.app.IfSlice(true, func() []app.UI{ return []app.UI{app.Text("true")} })
States
Context.SetState
now uses function chaining to specify options:ctx.SetState("ageState", 42). Persist(). ExpiresIn(time.Hour)