Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit 4d6611c

Browse files
authored
Update DOCS.md
1 parent dc90b84 commit 4d6611c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

DOCS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,14 +364,14 @@ Most of your components should simply take some params and render based on their
364364

365365
A common pattern is to create several stateless components that just render data, and have a stateful component above them in the hierarchy that passes its state to its children via `params`. The stateful component encapsulates all of the interaction logic, while the stateless components take care of rendering data in a declarative way.
366366

367-
### What *Should* Go in State?
367+
### What Should Go in State?
368368

369369
**State should contain data that a component's event handlers, timers, or http requests may change and trigger a UI update.**
370370

371371
When building a stateful component, think about the minimal possible representation of its state, and only store those properties in `state`. Add to your class methods to compute higher level values from your state variables. Avoid adding redundant or computed values as state variables as
372372
these values must then be kept in sync whenever state changes.
373373

374-
### What *Shouldn't* Go in State?
374+
### What Shouldn't Go in State?
375375

376376
`state` should only contain the minimal amount of data needed to represent your UI's state. As such, it should not contain:
377377

0 commit comments

Comments
 (0)