Skip to content

Commit 0013158

Browse files
authored
refactor(ssr): do not pass props/attrs to tmpl (#5095)
1 parent abfe39f commit 0013158

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

packages/@lwc/ssr-compiler/src/compile-js/generate-markup.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,9 @@ const bGenerateMarkup = esTemplate`
6464
yield* __renderAttrs(instance, attrs, hostScopeToken, scopeToken);
6565
yield '>';
6666
yield* tmplFn(
67-
props,
68-
attrs,
6967
shadowSlottedContent,
70-
lightSlottedContent,
71-
${/*component class*/ 3},
68+
lightSlottedContent,
69+
${/*component class*/ 3},
7270
instance
7371
);
7472
yield \`</\${tagName}>\`;

packages/@lwc/ssr-compiler/src/compile-template/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@ import type { CompilationMode } from '@lwc/shared';
2121
// TODO [#4663]: Render mode mismatch between template and compiler should throw.
2222
const bExportTemplate = esTemplate`
2323
export default async function* tmpl(
24-
props,
25-
attrs,
2624
shadowSlottedContent,
27-
lightSlottedContent,
28-
Cmp,
25+
lightSlottedContent,
26+
Cmp,
2927
instance
3028
) {
3129
// Deliberately using let so we can mutate as many times as we want in the same scope.

packages/@lwc/ssr-runtime/src/render.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ export function renderAttrsNoYield(
9696
}
9797

9898
export function* fallbackTmpl(
99-
_props: unknown,
100-
_attrs: unknown,
10199
_shadowSlottedContent: unknown,
102100
_lightSlottedContent: unknown,
103101
Cmp: LightningElementConstructor,
@@ -110,8 +108,6 @@ export function* fallbackTmpl(
110108

111109
export function fallbackTmplNoYield(
112110
emit: (segment: string) => void,
113-
_props: unknown,
114-
_attrs: unknown,
115111
_shadowSlottedContent: unknown,
116112
_lightSlottedContent: unknown,
117113
Cmp: LightningElementConstructor,

0 commit comments

Comments
 (0)