Introduction to React
React Introduction. ReactJS is a declarative, efficient, and flexible JavaScript library for building reusable UI components
Last updated
React Introduction. ReactJS is a declarative, efficient, and flexible JavaScript library for building reusable UI components
Last updated
A JavaScript library for building user interfaces
Javascript Liabary ที่ใช้สร้าง User interface หรือ หน้าจอบน Application โดย React นั้นถูกสร้างโดย Facebook และก็เป็น Facebook เช่นเดียวกันที่คอย Maintian React อยู่ ณ ตอนนี้
React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes.
Build encapsulated components that manage their own state, then compose them to make complex UIs.
Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep state out of the DOM.
React นั้นถูกออกแบบมาในลักษณะแบบ Component Base Architecture และ ทำงานอยู่บน Browser ดังนั้น Browser จะมีหน้าที่อ่าน code ของ React และประมวลผลทำงาน หรือ Render ส่วน Component Base Architecture คืออะไร ในการทำเว็บแบบสมัยใหม่ เรานิยมออกแบบหน้าเว็บแบบเป็น ชิ้น ๆ และก็นำมารวมประกอบกันให้เป็นหน้าเว็บหน้าหนึ่ง หรือ Application โดยแต่ละส่วนก็ทำงานแยกกันอย่างสิ้นเชิง ลองคิดถึง Component ในรูปเหมือน เลโก้ ที่เป็นส่วนเล็กๆ หรือ เป็นชิ้นส่วนต่าง ๆ และ เราก็นำ เลโก้ แต่ละชิ้นนำมาประกอบกัน