Skip to content

Commit 49a4869

Browse files
committed
update readme
1 parent 794b39d commit 49a4869

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

API.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,19 @@
1717
| <code>reRender(Object &#124; Function)</code> | Set the properties of a component instance. Can also take a function which will receive the current props as an argument. |
1818
| `getProps()` | Get the properties of a component instance. |
1919
| <code>setState(Object &#124; Function)</code> | Set the state of a component instance. Can also take a function which will receive the current props as an argument. |
20-
| `stylesheet()` | Returns a string of css to be lazily added to a `style` tag in the head. |
21-
| `styles()` | Returns an object that represents inline-styles to be applied to the component. Styles are applied by adding a keys from the object to the `styles` attribute of an html tag in the render function, for example `styles="key1 key2"`. Each object's key-value pair are added to the element's style object. |
22-
| `render()` | Returns HTML to be parsed or a dom node that will overwrite. There is usually no need to call this directly, prefer `componentInstance.reRender({ ... })`. |
20+
| `stylesheet()` | Should return a string of css to be lazily added to a `style` tag in the head. |
21+
| `styles()` | Should return an object that represents inline-styles to be applied to the component. Styles are applied by adding a keys from the object to the `styles` attribute of an html tag in the render function, for example `styles="key1 key2"`. Each object's key-value pair are added to the element's style object. |
22+
| `render()` | Should return HTML or nodes to be parsed or a dom node that will overwrite. There is usually no need to call this directly, prefer `componentInstance.reRender({ ... })`. |
2323
| html\`...\` | Tidy up an HTML string (use as a [tagged template][2]). |
2424

2525
## INSTANCE PROPERTIES
2626

2727
| Name | Description |
2828
| :--- | :--- |
29-
| <code>childElements</code> | An array of nodes, the original child elements of the component. |
30-
| <code>childNodes</code> | An array of nodes, the original child nodes of the component. |
29+
| <code>childElements</code> | An array of nodes, the original child *elements* of the component. |
30+
| <code>childNodes</code> | An array of nodes, the original child *nodes* of the component. |
31+
| <code>props</code> | An object that contains the properties that were passed to the component. |
32+
| <code>state</code> | A plain-old JSON object that contains the state of the component. |
3133

3234
## "LIFECYCLE" INSTANCE METHODS
3335

0 commit comments

Comments
 (0)