Skip to content

Docs / simple app : prefer component state over ad-hoc static object for stateful models  #1708

@barneycarroll

Description

@barneycarroll

As discussed in the chat over the last few minutes, the simple app documentation's dependency on an ad-hoc static object for stateful storage quickly becomes contrived when the model it seeks to represent maps one-to-one with the concerns of the component. One David Wraith was struck by edge cases in the model design that would be nullified or easily mitigated by binding the model to the component state.

The received implication of the simple app model is that "stateful components are bad" but for this example stateful components are a solution that avoids state management problems.

PR forthcoming.

Metadata

Metadata

Assignees

Labels

Area: DocumentationFor anything dealing mainly with the documentation itself

Type

No type

Projects

Status

Completed/Declined

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions