pull/6032/head
Conduitry 5 years ago
parent 9a0e0313a3
commit b5b0113fa9

@ -904,7 +904,7 @@ The following initialisation options can be provided:
| `target` | **none** | An `HTMLElement` to render to. This option is required
| `anchor` | `null` | A child of `target` to render the component immediately before
| `props` | `{}` | An object of properties to supply to the component
| `context` | `new Map()` | A `Map` of context key-value pairs to supply to the component
| `context` | `new Map()` | A `Map` of root-level context key-value pairs to supply to the component
| `hydrate` | `false` | See below
| `intro` | `false` | If `true`, will play transitions on initial render, rather than waiting for subsequent state changes
@ -1083,17 +1083,20 @@ const { head, html, css } = App.render({
});
```
You can call the `.render()` with the following parameters:
---
| option | default | description |
The `.render()` method accepts the following parameters:
| parameter | default | description |
| --- | --- | --- |
| `props` | `{}` | An object of properties to supply to the component
| `options` | `{}` | An object of options
The `options` object takes in the following properties:
| key | default | description |
The `options` object takes in the following options:
| option | default | description |
| --- | --- | --- |
| `context` | `new Map()` | A `Map` of context key-value pairs to supply to the component
| `context` | `new Map()` | A `Map` of root-level context key-value pairs to supply to the component
```js
const { head, html, css } = App.render(
@ -1101,7 +1104,7 @@ const { head, html, css } = App.render(
{ answer: 42 },
// options
{
context: new Map([['context-key', 'context-value']]),
context: new Map([['context-key', 'context-value']])
}
);
```
Loading…
Cancel
Save