Skip to content. | Skip to navigation

Personal tools


You are here: Home / Tips / React




Simplest React Stack

可在 app.js 檔案裡輸入下列 JSX 內容,這是一種 JavaScript 擴充語言,介於 JS 與 HTML 之間,要先經過 JSX Compiler 編譯過,才能被瀏覽器讀取:

const h1 = <h1>Hello World</h1>;

其中 <h1>Hello World</h1> 稱為 JSX Element。


Router vs Component: 同一個網址但不同參數 ?tags=Dress or ?tags=Bag Compound Components react navigation and navigators in react native Parcel JS and React Form Elements: onChange, defaultValue, defaultChecked

run React Native components and APIs on the web using React DOM

Flex Basic Difference Between Android and iOS Layout Weather View Grid Example React UI Component Playground

ipad Scaling SplitView Dimension issue Two Column Layout Optimistic UI

Gatsby: site generator multiple post type

Progress Bar with Redux four-ways-to-style-react-components

Cache Performance Firebase Simple Chat deploy-react-js-app-on-firebase

Jenkins Build Docker get-started-with-layouts

Component State Management: Redux => React Context API

Tips for Google Maps

Formik Field Arrays Todo App with Mobx-State-Tree

Hooks API dynamically-animating-elements-one-after-the-other setting-up-typescript-in-your-react-app  Building Todo App with Hooks



No-boilerplate global state management 應用程式規模變大時,通常會導入 MobX 或 Redux 之類的狀態管理工具,但有人抱怨它們帶來 Boilerplate 和 Learning Curve 兩大困擾。React 本身就有 this.state 和 this.setState 內建工具,新的 useState 是 hook。