-
Notifications
You must be signed in to change notification settings - Fork 439
feat: CSR/SSRv1 context #5356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: CSR/SSRv1 context #5356
Changes from 2 commits
8097059
60040a9
f9a9acb
b394e9e
d395543
3267884
b95f94f
f857d10
4d7c32b
1181705
bfbb5ca
c5b29e4
8edc472
043eb29
24dcf50
094aeb8
5c4b25f
eed8082
4ae7f1a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -704,8 +704,10 @@ export function runConnectedCallback(vm: VM) { | |
| connectWireAdapters(vm); | ||
| } | ||
|
|
||
| // Setup context before connected callback is executed | ||
| connectContext(vm); | ||
| if (lwcRuntimeFlags.ENABLE_EXPERIMENTAL_SIGNALS) { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @divmain I protected the new context implementation with the same
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Re-using the flag makes sense to me. They're closely entangled, as you say. |
||
| // Setup context before connected callback is executed | ||
| connectContext(vm); | ||
| } | ||
|
|
||
| const { connectedCallback } = vm.def; | ||
| if (!isUndefined(connectedCallback)) { | ||
|
|
@@ -756,7 +758,11 @@ function runDisconnectedCallback(vm: VM) { | |
| if (process.env.NODE_ENV !== 'production') { | ||
| assert.isTrue(vm.state !== VMState.disconnected, `${vm} must be inserted.`); | ||
| } | ||
| disconnectContext(vm); | ||
|
|
||
| if (lwcRuntimeFlags.ENABLE_EXPERIMENTAL_SIGNALS) { | ||
| disconnectContext(vm); | ||
| } | ||
|
|
||
| if (isFalse(vm.isDirty)) { | ||
| // this guarantees that if the component is reused/reinserted, | ||
| // it will be re-rendered because we are disconnecting the reactivity | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.