Skip to content

more granular html/markdown hot reload #1193

Closed Answered by Fil
declann asked this question in Q&A
Discussion options

You must be logged in to vote

For this use case you have to find a way to give a name to the target cell, so that the reactive runtime can know about it. If you are using side effects (i.e. code that directly modifies the DOM without informing the runtime), there is no way to know if this code was supposed to run once or needs to be reactivated.

A solution would look like this:

```js
const placeholder = html`<div id="placeholder"></div>`
```

```js
placeholder.textContent = "hello";
```

Replies: 2 comments

Comment options

Fil
Apr 2, 2024
Collaborator

You must be logged in to vote
0 replies
Answer selected by declann
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
enhancement New feature or request
2 participants
Converted from issue

This discussion was converted from issue #1192 on April 02, 2024 19:40.