yznts / kyoto

Asynchronous frontends with Go
https://pkg.go.dev/github.com/yznts/kyoto/v3
MIT License
651 stars 28 forks source link

Interaction with complex state across different adapters is uncomfortable #128

Closed yznts closed 2 years ago

yznts commented 2 years ago

In the struct mode it's much easier to initialize nested components and interact with them in next lifecycle steps. In case of func mode (which is default now) we need to interact with kyoto.Store instance, which is OK for simple state, but interaction with nested components is awful. You need to understand how Core.Component works and use explicit type casting.

Needs to figure out, how to simplify work with components.

yznts commented 2 years ago

It's now possible to use state.New for simple interaction with a state

yznts commented 2 years ago

New architecture will be provided instead of current, not applicable.