(name string, defaultValue T)
| 90 | } |
| 91 | |
| 92 | func SharedAtom[T any](name string, defaultValue T) Atom[T] { |
| 93 | fullName := "$shared." + name |
| 94 | client := engine.GetDefaultClient() |
| 95 | atom := engine.MakeAtomImpl(defaultValue, nil) |
| 96 | client.Root.RegisterAtom(fullName, atom) |
| 97 | return Atom[T]{name: fullName, client: client} |
| 98 | } |
| 99 | |
| 100 | func convertAppMetaToEngineMeta(appMeta *AtomMeta) *engine.AtomMeta { |
| 101 | if appMeta == nil { |
nothing calls this directly
no test coverage detected