Make a typed scratch key. Use module-level constants so the same key
is shared by writer and reader.
Namespace the name by behavior or feature to avoid collisions
('behavior.field' is a good convention). Two keys with the same
name refer to the same slot at runtime — the type parameter is a
compile-time contract, not a uniqueness guarantee.
Make a typed scratch key. Use module-level constants so the same key is shared by writer and reader.
Namespace the name by behavior or feature to avoid collisions (
'behavior.field'is a good convention). Two keys with the samenamerefer to the same slot at runtime — the type parameter is a compile-time contract, not a uniqueness guarantee.