Class <Type> LocalField
publicRepresents a field whose value is a local value that is not stored in the cache, nor is it sent to the server.
Local fields can be written to, and their value is both memoized and reactive (though not deep-tracked).
Because their state is not derived from the cache data or the server, they represent a divorced uncanonical source of state.
For this reason Local fields should be used sparingly.
Currently, while we document this feature here, only allow our own SchemaRecord default fields to utilize them and the feature should be considered private.
Example use cases that drove the creation of local
fields are states like isDestroying
and isDestroyed
which are specific to a record instance but not
stored in the cache. We wanted to be able to drive
these fields from schema the same as all other fields.
Don't make us regret this decision.