Skip to content
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

arrowjs reactivity #74

Open
haoyun opened this issue Jun 12, 2024 · 1 comment
Open

arrowjs reactivity #74

haoyun opened this issue Jun 12, 2024 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@haoyun
Copy link

haoyun commented Jun 12, 2024

${state.items.map((item) => html`<li>${item}</li>`.key(item))}

should all examples like this be replaced by a "dynamic expression" according to https://www.arrow-js.com/docs/#templates.

Otherwise, the html is "static".

@tonekk
Copy link

tonekk commented Jul 30, 2024

Can confirm, none of the "vanilla" JS examples work.
Apart from the fact that they're actually in typescript, they lack reactivity, as @haoyun said.

All of the map calls need to be wrapped in arrow functions.

@sashamilenkovic sashamilenkovic self-assigned this Jul 30, 2024
@sashamilenkovic sashamilenkovic added the documentation Improvements or additions to documentation label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants