Skip to content

fix(state): unsub to subscribed context on disconnect#49

Merged
rax-it merged 12 commits intomainfrom
rave/unsub-context
Nov 12, 2024
Merged

fix(state): unsub to subscribed context on disconnect#49
rax-it merged 12 commits intomainfrom
rave/unsub-context

Conversation

@rax-it
Copy link
Copy Markdown
Contributor

@rax-it rax-it commented Nov 7, 2024

No description provided.

@rax-it rax-it force-pushed the rave/unsub-context branch from c8fc5c2 to d3593fb Compare November 7, 2024 19:54
@rax-it rax-it marked this pull request as ready for review November 7, 2024 22:33
@rax-it rax-it changed the title fix: unsub context fix(state): unsub to subscribed context on disconnect Nov 7, 2024
@rax-it rax-it requested a review from divmain November 7, 2024 22:36
@rax-it
Copy link
Copy Markdown
Contributor Author

rax-it commented Nov 12, 2024

It seems we can't do

hideChild = false; instead of showChild = !false;

because then the template will look like:

<template lwc:if={!hideChild}>

which is also not allowed in lwc because of

[CompilerError: Invalid expression {!showChild} - LWC1060: Template expression doesn't allow UnaryExpression] {
  level: 1,
  code: 1060,
  filename: 'contextParent.html',
  location: { line: 3, column: 13, start: 41, length: 19 }
}

@rax-it rax-it requested a review from divmain November 12, 2024 18:37
"moduleResolution": "nodeNext",
"esModuleInterop": false,
"target": "ES2021",
"target": "ES2023",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required to use non-registered symbols as WeakMap keys, more details here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverted to es2021, as per our discussion

@rax-it rax-it requested a review from divmain November 12, 2024 23:23
@rax-it rax-it merged commit bd4cf55 into main Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants