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

备稿计划: svelte 5 #162

Open
iugo opened this issue Dec 12, 2024 · 0 comments
Open

备稿计划: svelte 5 #162

iugo opened this issue Dec 12, 2024 · 0 comments

Comments

@iugo
Copy link
Member

iugo commented Dec 12, 2024

https://svelte.dev/blog/svelte-5-is-alive

  1. svelte 5 之前, 普通数据和 state 的声明方式是一样的, 看上去非常方便, 但是在运行时可能存在被重新定义导致渲染失败的问题. 现在通过显性声明 state 解决这一问题.
  2. 新语法 Snippet 替代 slot.
  3. 原生 TypeScript 支持.

一直以来, 我们都更倾向不使用模板语法, 而是使用 JSX. 如果足够简单, 并且通过编译时运行提升了运行时速度, 我们或许也可以接受 svelte 5.

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

No branches or pull requests

1 participant