Merge pull request #1665 from barneycarroll/patch-14

Docs: component props aren't copied to instances
This commit is contained in:
Isiah Meadows 2017-02-27 10:44:32 -05:00 committed by GitHub
commit aaa6de784b

View file

@ -109,7 +109,7 @@ The state of a component can be accessed three ways: as a blueprint at initializ
#### At initialization
Any property attached to the component object is copied for every instance of the component. This allows simple state initialization.
The component object is the prototype of each component instance, so any property defined on the component object will be accessible as a property of `vnode.state`. This allows simple state initialization.
In the example below, `data` is a property of the `ComponentWithInitialState` component's state object.