Browse Source

Clarify class lifetime in class conversion example (#912)

* Clarify class lifetime in class conversion example

* Update state-and-lifecycle.md
main
Sophie Alpert 7 years ago
committed by Dan Abramov
parent
commit
5045e82b2a
  1. 2
      content/docs/state-and-lifecycle.md

2
content/docs/state-and-lifecycle.md

@ -104,7 +104,7 @@ class Clock extends React.Component {
`Clock` is now defined as a class rather than a function.
This lets us use additional features such as local state and lifecycle hooks.
The `render` method will be called each time an update happens, but as long as we render `<Clock />` into the same DOM node, only a single instance of the `Clock` class will be used. This lets us use additional features such as local state and lifecycle hooks.
## Adding Local State to a Class

Loading…
Cancel
Save