Merge pull request #1665 from barneycarroll/patch-14
Docs: component props aren't copied to instances
This commit is contained in:
commit
aaa6de784b
1 changed files with 1 additions and 1 deletions
|
|
@ -109,7 +109,7 @@ The state of a component can be accessed three ways: as a blueprint at initializ
|
||||||
|
|
||||||
#### At initialization
|
#### 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.
|
In the example below, `data` is a property of the `ComponentWithInitialState` component's state object.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue