
Web组件JS框架语法和特性快速概览
网站:https://component-party.dev
🤔 为什么?
许多JS开发者对现有的各种JS框架及其语法和特性没有很好的整体认识。
我们如何解决这个问题?开发者喜欢通过示例来了解框架概览。这是深入学习之前的快速入门。
🔥 进度
<details>
<summary>
<img width="18" height="18" src="https://yellow-cdn.veclightyear.com/835a84d5/2e868377-0f08-457c-9846-09c554ec38f5.svg" />
<b>Svelte 4</b>
<img src="https://us-central1-progress-markdown.cloudfunctions.net/progress/100" /></summary>
</details><details>
<summary>
<img width="18" height="18" src="https://yellow-cdn.veclightyear.com/835a84d5/4a0f7472-f134-4c20-bc6c-0a958a486152.svg" />
<b>React</b>
<img src="https://us-central1-progress-markdown.cloudfunctions.net/progress/100" /></summary>
</details><details>
<summary>
<img width="18" height="18" src="https://yellow-cdn.veclightyear.com/835a84d5/81d17c59-3805-4588-9c09-b2d92299e94f.svg" />
<b>Vue 3</b>
<img src="https://us-central1-progress-markdown.cloudfunctions.net/progress/100" /></summary>
</details><details>
<summary>
<img width="18" height="18" src="https://yellow-cdn.veclightyear.com/835a84d5/87796545-335c-4af9-aff2-e6d346f5f8ef.svg" />
<b>Angular</b>
<img src="https://us-central1-progress-markdown.cloudfunctions.net/progress/96" /></summary>
</details><details>
<summary>
<img width="18" height="18" src="https://yellow-cdn.veclightyear.com/835a84d5/d238d951-881a-4ff2-8b15-4546ba7bee15.svg" />
<b>Lit</b>
<img src="https://us-central1-progress-markdown.cloudfunctions.net/progress/100" /></summary>
</details><details>
<summary>
<img width="18" height="18" src="https://yellow-cdn.veclightyear.com/835a84d5/81d17c59-3805-4588-9c09-b2d92299e94f.svg" />
<b>Vue 2</b>
<img src="https://us-central1-progress-markdown.cloudfunctions.net/progress/100" /></summary>
</details><details>
<summary>
<img width="18" height="18" src="https://yellow-cdn.veclightyear.com/835a84d5/d467b034-3b63-4455-aafb-7a38bde03147.svg" />
<b>Ember (Polaris - 预览版)</b>
<img src="https://us-central1-progress-markdown.cloudfunctions.net/progress/84" /></summary>
- [x] 响应式
- [x] 声明状态
- [x] 更新状态
- [x] 计算状态
- [x] 模板
- [x] 最小模板
- [x] 样式
- [x] 循环
- [x] 点击事件
- [x] DOM引用
- [x] 条件渲染
- [x] 生命周期
- [x] 挂载时
- [x] 卸载时
- [x] 组件组合
- [x] 属性传递
- [x] 向父组件发送事件
- [x] 插槽
- [x] 插槽默认内容
- [x] 上下文
- [x] 表单输入
- [x] 文本输入
- [x] 复选框
- [x] 单选按钮
- [x] 下拉选择
- [ ] Web应用功能
- [ ] 渲染应用
- [ ] 获取数据
- [ ] 路由链接
- [ ] 路由
</details><details>
<summary>
<img width="18" height="18" src="https://yellow-cdn.veclightyear.com/835a84d5/d467b034-3b63-4455-aafb-7a38bde03147.svg" />
<b>Ember (Octane)</b>
<img src="https://us-central1-progress-markdown.cloudfunctions.net/progress/96" /></summary>
</details><details>
<summary>
<img width="18" height="18" src="https://yellow-cdn.veclightyear.com/835a84d5/0596446c-2e3b-4505-859d-326fdcdabfbc.svg" />
<b>SolidJS</b>
<img src="https://us-central1-progress-markdown.cloudfunctions.net/progress/100" /></summary>
</details><details>
<summary>
<img width="18" height="18" src="https://yellow-cdn.veclightyear.com/835a84d5/e8cea352-9622-4f8d-b2b1-c18fbb81b4bb.svg" />
<b>Alpine</b>
<img src="https://us-central1-progress-markdown.cloudfunctions.net/progress/96" /></summary>
</details><details>
<summary>
<img width="18" height="18" src="https://yellow-cdn.veclightyear.com/835a84d5/095c7998-45b3-4fed-ad78-63b8b67e76f1.svg" />
<b>Mithril</b>
<img src="https://us-central1-progress-markdown.cloudfunctions.net/progress/100" /></summary>
</details><details>
<summary>
<img width="18" height="18" src="https://yellow-cdn.veclightyear.com/835a84d5/fec5f764-f112-4247-86b1-e94f51106e2e.svg" />
<b>Aurelia 2</b>
<img src="https://us-central1-progress-markdown.cloudfunctions.net/progress/100" /></summary>
</details><details>
<summary>
<img width="18" height="18" src="https://yellow-cdn.veclightyear.com/835a84d5/9ab76949-b3b3-404b-afbc-997ebcca4164.svg" />
<b>Qwik</b>
<img src="https://us-central1-progress-markdown.cloudfunctions.net/progress/100" /></summary>
</details><details>
<summary>
<img width="18" height="18" src="https://yellow-cdn.veclightyear.com/835a84d5/20490503-befe-4ba1-bb78-be5421bbec78.svg" />
<b>Marko</b>
<img src="https://us-central1-progress-markdown.cloudfunctions.net/progress/100" /></summary>
- [x] 响应式
- [x] 声明状态
- [x] 更新状态
- [x] 计算状态
- [x] 模板
- [x] 最小模板
- [x] 样式
- [x] 循环
- [x] 点击事件
- [x] DOM 引用
- [x] 条件渲染
- [x] 生命周期
- [x] 挂载时
- [x] 卸载时
- [x] 组件组合
- [x] 属性
- [x] 向父组件发送事件
- [x] 插槽
- [x] 插槽默认内容
- [x] 上下文
- [x] 表单输入
- [x] 文本输入
- [x] 复选框
- [x] 单选框
- [x] 选择框
- [x] Web 应用功能
- [x] 渲染应用
- [x] 获取数据
- [x] 路由链接
- [x] 路由
</details><details>
<summary>
<img width="18" height="18" src="https://yellow-cdn.veclightyear.com/835a84d5/fec5f764-f112-4247-86b1-e94f51106e2e.svg" />
<b>Aurelia 1</b>
<img src="https://us-central1-progress-markdown.cloudfunctions.net/progress/92" /></summary>
</details><details>
<summary>
<img width="18" height="18" src="https://yellow-cdn.veclightyear.com/835a84d5/2e868377-0f08-457c-9846-09c554ec38f5.svg" />
<b>Svelte 5 (预览版)</b>
<img src="https://us-central1-progress-markdown.cloudfunctions.net/progress/100" /></summary>
</details>
<!-- progression end -->
🤝 贡献
本网站使用 Vite 和 Svelte 构建。网站内容以 Markdown 格式编写,位于 content
目录中。对于简单的编辑,您可以直接在 GitHub 上编辑文件并生成一个 Pull Request。
对于本地开发,推荐使用 pnpm 作为包管理器:
pnpm i
pnpm run dev
本项目要求 Node.js 版本为 v16.0.0
或更高。
添加/编辑框架片段的原则
对于 Component Party 来说,清晰度比优化更重要
在 Component Party 中,我们优先考虑清晰度而非优化,这是我们的核心教育重点。我们的目标是简化不同 JS 框架的复杂概述,以便于理解,而不是呈现过于优化的解决方案。
我们相信,深入理解应该先于优化,使学习者能够掌握框架的使用并独立发现优化技巧。这种方法符合我们致力于在 Web 组件 JavaScript 框架领域促进可访问和有效学习的承诺。
添加新框架
- Fork 项目并创建新分支
- 在
public/framework
中添加新框架的 SVG logo
- 安装与该框架相关的 ESLint 插件
- 在
frameworks.mjs
中添加一个新条目,包含 SVG 链接和 ESLint 配置
- 如果该框架需要语言语法高亮,请将其添加到
build/lib/generateContent.js
中 getHighlighter
调用的 langs
参数中
- 创建 playground 链接:
- 在
build/lib/playground
中添加一个 create${FRAMEWORK}Playground.js
文件
- 该文件应导出一个函数,返回一个对象,其中包含
fromContentByFilename
方法。该方法接受一个对象,其中键为文件路径,值为文件内容,然后返回一个框架在线 REPL 的绝对 URL,其中加载了这些文件
- 在
build/lib/playground/index.js
中注册其导出
🧑💻 贡献者
本项目的存在要感谢所有做出贡献的人。[贡献].

⚖️ 许可证
MIT。用 💖 制作