Skip to content

Commit 9217a54

Browse files
committed
docs: major changeset
1 parent 81ef4f2 commit 9217a54

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

.changeset/clear-pugs-make.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
---
2-
"@patternfly/pfe-core": patch
2+
"@patternfly/pfe-core": major
33
"@patternfly/elements": patch
44
---
5-
Enable context protocol in SSR scenarios.
5+
Enable `connectedCallback()` and context protocol in SSR scenarios.
6+
7+
BREAKING CHANGE
8+
This change affects any element which is expected to execute in node JS when
9+
lit-ssr shims are present. By enabling the `connectedCallback()` to execute
10+
server side. Elements must ensure that their connectedCallbacks do not try to
11+
access the DOM.
12+
13+
Before:
14+
15+
```js
16+
connectedCallback() {
17+
super.connectedCallback();
18+
this.items = this.querySelectorAll('my-item');
19+
}
20+
```
21+
22+
After:
23+
```js
24+
connectedCallback() {
25+
super.connectedCallback();
26+
if (!isServer) {
27+
this.items = this.querySelectorAll('my-item');
28+
}
29+
}
30+
```
31+

0 commit comments

Comments
 (0)