From 3324b4f2aae038b9d77229bb6e7a62feabbd97a8 Mon Sep 17 00:00:00 2001 From: tanhauhau Date: Wed, 31 Mar 2021 21:41:40 +0800 Subject: [PATCH] remove ssr slots from the docs --- site/content/docs/03-run-time.md | 2 -- src/runtime/internal/ssr.ts | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/site/content/docs/03-run-time.md b/site/content/docs/03-run-time.md index af15c950cd..6b070ec3cd 100644 --- a/site/content/docs/03-run-time.md +++ b/site/content/docs/03-run-time.md @@ -1093,7 +1093,6 @@ You can call the `.render()` with the following parameters: 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 ```js @@ -1102,7 +1101,6 @@ const { head, html, css } = App.render( { answer: 42 }, // options { - slots: { 'slot-a': (lets) => 'hello world' }, context: new Map([['context-key', 'context-value']]), } ); diff --git a/src/runtime/internal/ssr.ts b/src/runtime/internal/ssr.ts index 8257734ef8..5e7977571c 100644 --- a/src/runtime/internal/ssr.ts +++ b/src/runtime/internal/ssr.ts @@ -97,7 +97,7 @@ export function create_ssr_component(fn) { } return { - render: (props = {}, { slots = {}, context = new Map() } = {}) => { + render: (props = {}, { $$slots = {}, context = new Map() } = {}) => { on_destroy = []; const result: { @@ -109,7 +109,7 @@ export function create_ssr_component(fn) { }>; } = { title: '', head: '', css: new Set() }; - const html = $$render(result, props, {}, slots, context); + const html = $$render(result, props, {}, $$slots, context); run_all(on_destroy);