学习 Preact

¥Learn Preact

你是否想知道 Preact 是什么,或者它是如何工作的?

¥Have you ever wondered what Preact is all about, or how it works?

也许你一直在使用 WordPress 创建出色的网站,使用 D3 设计图形,或者使用 jQuery 构建有用的交互式表单。在某些时候,你编写的 JavaScript 变得足够复杂以至于难以管理 - 记住哪个文件控制页面的一部分,或者调试两个试图增强同一元素的插件之间的交互。

¥Maybe you've been creating awesome websites using WordPress, designing graphics with D3, or building helpful interactive forms with jQuery. At some point, the JavaScript you've written became complex enough that it was difficult to manage - remembering which file controls part of a page, or debugging an interaction between two plugins trying to enhance the same element.

也许你在某个时候接触过 Preact,并想知道它有什么特别之处?为什么 IKEA、Bing、Etsy 和 其他 等高流量网站使用 Preact?

¥Perhaps you've come across Preact at some point, and wondered what's so special about it? Why do high-traffic sites like IKEA, Bing, Etsy and others use Preact?

最简单的答案是 Preact 提供了用称为组件的可重用小块构建复杂 Web 应用所需的工具。Preact 的独特之处在于它在一个独特的小包中提供了这些工具:只有 3kb 的 JavaScript 代码,或者大约 一页文本

¥The simplest answer is that Preact provides the tools needed to construct complex web applications out of small reusable pieces called Components. What makes Preact unique is that it provides these tools in a uniquely small package: just 3kb of JavaScript code, or around one page of text.

如果这听起来很吸引你,那么本教程是一个很好的起点。你不仅会了解如何使用 Preact 构建应用,还会了解 Preact 的幕后工作原理。每章都包含一个测试你所学内容的机会,或使用“帮助”按钮查看答案。

¥If that sounds compelling to you, this tutorial is a great place to start. You'll learn not only how to build applications using Preact, but also how Preact works under the hood. Each chapter contains an opportunity to test what you've learned, or use the Help button to see the answer.

Loading...