Closed object88 closed 7 years ago
Given model...
export type BazModelType = { bazNum: number, innerBazs: Array<InnerBazModelType>, }; export type InnerBazModelType = { key: string, value: string, }
... the codegen produces a fromJS for Baz which doesn't declare and initialize state:
fromJS
Baz
state
static fromJS(json: BazModelType): Baz { state.innerBazs = state.innerBazs.map(item => InnerBaz.fromJS(item)); return new Baz(Immutable.fromJS(json)); }
Proposal: instead of only creating a state variable if there is a default[ModelType]Values, always do so. Thoughts?
default[ModelType]Values
Given model...
... the codegen produces a
fromJS
forBaz
which doesn't declare and initializestate
:Proposal: instead of only creating a
state
variable if there is adefault[ModelType]Values
, always do so. Thoughts?