From b5b0113fa9c306df23b76f0ceeab966074f0a921 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Wed, 31 Mar 2021 10:52:26 -0400 Subject: [PATCH] tweak docs --- site/content/docs/03-run-time.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/site/content/docs/03-run-time.md b/site/content/docs/03-run-time.md index 6b070ec3cd..7fbc8850de 100644 --- a/site/content/docs/03-run-time.md +++ b/site/content/docs/03-run-time.md @@ -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']]) } ); -``` \ No newline at end of file +```