|
|
|
@ -1088,16 +1088,22 @@ You can call the `.render()` with the following parameters:
|
|
|
|
| option | default | description |
|
|
|
|
| option | default | description |
|
|
|
|
| --- | --- | --- |
|
|
|
|
| --- | --- | --- |
|
|
|
|
| `props` | `{}` | An object of properties to supply to the component
|
|
|
|
| `props` | `{}` | An object of properties to supply to the component
|
|
|
|
| `slots` | `{}` | A object of slots to supply to the component
|
|
|
|
| `options` | `{}` | An object of options
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The `options` object takes in the following properties:
|
|
|
|
|
|
|
|
| key | default | description |
|
|
|
|
|
|
|
|
| --- | --- | --- |
|
|
|
|
|
|
|
|
| `slots` | `{}` | slots 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 context key-value pairs to supply to the component
|
|
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
```js
|
|
|
|
const { head, html, css } = App.render(
|
|
|
|
const { head, html, css } = App.render(
|
|
|
|
// props
|
|
|
|
// props
|
|
|
|
{ answer: 42 },
|
|
|
|
{ answer: 42 },
|
|
|
|
// slots
|
|
|
|
// options
|
|
|
|
{ 'slot-a': (lets) => 'hello world' },
|
|
|
|
{
|
|
|
|
// contexts
|
|
|
|
slots: { 'slot-a': (lets) => 'hello world' },
|
|
|
|
new Map([['context-key', 'context-value']]),
|
|
|
|
context: new Map([['context-key', 'context-value']]),
|
|
|
|
|
|
|
|
}
|
|
|
|
);
|
|
|
|
);
|
|
|
|
```
|
|
|
|
```
|