From 9d82fe5ed8b9bd8650cb633d9cd37221fd3155d7 Mon Sep 17 00:00:00 2001 From: somkiat Date: Tue, 16 May 2017 00:51:19 +0700 Subject: [PATCH 01/22] Start to translate to Thai language --- README-th.md | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 README-th.md diff --git a/README-th.md b/README-th.md new file mode 100644 index 0000000..46db022 --- /dev/null +++ b/README-th.md @@ -0,0 +1,123 @@ +# react-howto + +If you’re new to React (or frontend in general) you may find the ecosystem confusing. There are a few reasons for this. +สำหรับผู้เริ่มต้นศึกษาและนำ React มาพัฒนาระบบนั้น มักจะมีความสับสนอย่างมากกับภาพรวมของ React เนื่องด้วยเหตุผลดังนี้ + +* เป้าหมายของ React นั้นสำหรับนักพัฒนาที่ชอบลองของใหม่ ๆ และผู้เชี่ยวชาญ + +* นี่คือสิ่งที่ Facebook ใช้งาน ดังนั้นไม่ได้สนใจว่าจะนำไปใช้กับระบบที่เล็กกว่าอย่างไร + +* มีเอกสารต่าง ๆ ที่แย่เอามาก ๆ เช่น React guide เป็นต้น + + +Throughout this document, I’ll assume you’ve built a web page with HTML, CSS and JavaScript. +คาดหวังว่าทุกคนที่เข้ามาอ่านเอกสารนี้ ต้องมีความรู้และเข้าใจเกี่ยวกับการพัฒนาระบบเว็บด้วย HTML, CSS และ JavaScript + +## Why should you listen to me? + +There’s a ton of conflicting advice about React out there; why listen to me? +ในปัจจุบันมีความแนะนำต่าง ๆ มากมายแถมขัดแย้งกันเกี่ยวกับ React + +I was one of the original members of the Facebook team that built and open-sourced React. I’m no longer at Facebook and I’m now at a small startup, so I have a non-Facebook perspective as well. +ผู้เขียนเอกสารฉบับนี้เคยร่วมทีมพัฒนา React ที่ Facebook แต่ตอนนี้ออกมาทำบริษัท Startup เอง ดังนั้นสิ่งต่าง ๆ ในเอกสารนี้จึงเป็นมุมมองจากภายนอก + +## How to tackle the React ecosystem + +All software is built on a stack of technologies, and you need to understand enough of that stack to build your app. The reason why the React ecosystem of tooling seems overwhelming is because it’s always explained in the wrong order. + +ระบบงานต่าง ๆ สร้างอยู่ในเทคโนโลยีมากมาย ดังนั้นผู้พัฒนาจะต้องรู้และเข้าใจในเทคโนโลยีต่าง ๆ ที่ใช้ในการพัฒนาเป็นอย่างดี เมื่อกลับมาดู React พบว่ามีเครื่องมือและชุดของ library ต่าง ๆ จำนวนมากมาย ซึ่งทำให้เกิดความสับสนในการศึกษาและนำไปใช้งานอย่างมาก เหตุผลหลัก ๆ มาจากลำดับการอธิบายที่ผิดพลาด + +You should learn, in this order, **without skipping ahead or learning concurrently**: + +ดังนั้นต้องทำการศึกษาตามลำดับนี้ **อย่าข้ามโดยเด็ดขาด** + +* [ศึกษา React ด้วยตนเอง](#learning-react-itself) +* [ศึกษา`npm`](#learning-npm) +* [ศึกษา JavaScript “bundlers”](#learning-javascript-bundlers) +* [ศึกษา ES6](#learning-es6) +* [ศึกษา Routing](#learning-routing) +* [ศึกษา Flux](#learning-flux) + +**You don't need to learn all of these to be productive with React.** Only move to the next step if you have a problem that needs to be solved. + +Additionally, there are a few topics that are often mentioned in the React community that are "bleeding edge". The topics below are interesting, but they're difficult to understand, are far less popular than the above topics and **aren't required for most apps**. +* [Inline styles](#learning-inline-styles) +* [Server rendering](#learning-server-rendering) +* [Immutable.js](#learning-immutablejs) +* [Relay, Falcor, etc](#learning-relay-falcor-etc) + +## Learning React itself + +It’s a common misconception that you need to waste a lot of time setting up tooling to start to learn React. In the official documentation you’ll find a [copy-paste HTML template](https://facebook.github.io/react/docs/getting-started.html#quick-start-without-npm) that you can save in an `.html` file and get started right away. **No tooling is required for this step, and don’t start learning extra tooling until you’re comfortable with React basics.** + +I still think the easiest way to learn React is [the official tutorial](https://facebook.github.io/react/docs/tutorial.html). + +## Learning `npm` + +`npm` is the Node.js package manager and is the most popular way front-end engineers and designers share JavaScript code. It includes a module system called `CommonJS` and lets you install command-line tools written in JavaScript. Read [this post](http://0fps.net/2013/01/22/commonjs-why-and-how/) for background on why `CommonJS` is necessary for browsers, or the [CommonJS Spec Wiki](http://wiki.commonjs.org/wiki/Introduction) for more on the `CommonJS` API. + +Most reusable components, libraries and tools in the React ecosystem are available as `CommonJS` modules and are installed with `npm`. + +## Learning JavaScript bundlers + +For a number of good technical reasons `CommonJS` modules (i.e. everything in `npm`) cannot be used natively in the browser. You need a JavaScript “bundler” to “bundle” these modules into `.js` files that you can include in your web page with a `