Инициализация один раз, осознанное заполнение: выбор начального состояния FeatureCell
DEV · 13.11.2026 · 23:24
В статье рассматривается, как метод initialize() активирует рабочий процесс, а значение, с которым начинается FeatureCell, зависит от различных источников. Обсуждаются моменты, когда метод…
Оригинал
Initialize Once, Hydrate Deliberately: Choosing a FeatureCell's Starting State
A FeatureCell does not start with "whatever was in the constructor." Calling initialize() activates the runtime pipeline, and the value it begins with depends on a resolved decision between a declared default, a previously persisted value, and a deliberate hydrate() factory. Knowing which source wins — and why — is what separates an accidental starting value from an intentional one. This post walks through what initialize() actually activates, when hydrate() overrides everything else, and how t