Skip to content

Commit 4a80799

Browse files
janechuCopilot
andcommitted
docs: keep declarative migration out of PR1
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent bd2bf0d commit 4a80799

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

packages/fast-element/DECLARATIVE_MIGRATION.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,18 @@ See the [`@microsoft/fast-element` MIGRATION.md](../fast-element/MIGRATION.md#hy
3838
1. Replace `RenderableFASTElement(MyComponent).defineAsync({...})` with `MyComponent.define({...})`.
3939

4040
```typescript
41-
// Before
42-
import { RenderableFASTElement } from "@microsoft/fast-html";
43-
RenderableFASTElement(MyComponent).defineAsync({
44-
name: "my-component",
45-
});
46-
47-
// After
48-
MyComponent.define({
49-
name: "my-component",
50-
});
41+
// Before
42+
import { RenderableFASTElement } from "@microsoft/fast-html";
43+
RenderableFASTElement(MyComponent).defineAsync({
44+
name: "my-component",
45+
templateOptions: "defer-and-hydrate",
46+
});
47+
48+
// After
49+
MyComponent.define({
50+
name: "my-component",
51+
templateOptions: "defer-and-hydrate",
52+
});
5153
```
5254

5355
2. Remove `prepare()` methods. Move any initialization logic to `connectedCallback`:

0 commit comments

Comments
 (0)