JavaScript required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Skip to content
youhoc
Pages
Home
Modern App Guidelines
Node.js
Installing & Exploring
Loading Modules
npm - Get Command Input
Express.js
Express Web Server
Template Engine & MVC
Authentication
Authentication Trong REST API Với JWT
File Upload with Multer, Express.js
Server-Side Validation Với Express-Validator
Sequelize
Sequelize Transactions: Đảm Bảo Tính Toàn Vẹn Dữ Liệu
7 loại Data Types phổ biến Trong Sequelize
Phân Trang (Pagination) Trong Express.js Với Sequelize/MySQL
Hướng dẫn Cơ bản về Rest API
Node-cron Simple to Complex Setup with PM2
Hono
Hono Response
Error Handling
Cloudflare
Minimal Cloudflare Worker + Hono + Drizzle ORM (part 1)
Minimal Cloudflare Worker + Hono + Drizzle ORM (part 2)
htmx
HTMx Form: Request, Response, Swap
Linux
Day 1: Linux Distributions & Navigation
Day 2: User Management
Day 3: File Permission & Ownership
Day 4: Package Management
Day 5: Services Management
Javascript
JS The Weird Part
Execution Context
Types & Operators
Objects & Functions
Error Handling & Strict Mode
Typescript, ES6, Tra
Modern JS
JS in the Browser
Data Storage JSON
Modern JS
Advanced Objects & Methods
Webpack & Babel
Async
jQuery
In-depth Analysis of jQuery
React-ready JS
Arrow Function
Template Literals
Logical AND, OR, Ternary, Nullish Operators
Destructuring & Rest Operator
Array Method
Immutability and Spread Operator
Promises, Async/Await, Callback
Typescript
TypeScript cơ bản (phần 1)
TypeScript cơ bản (phần 2)
require vs import
React
Hiểu React từ gốc rễ qua biên dịch từ Vanilla JS
Hiểu React Component cơ bản với Rating App
Thay đổi giao diện với State và useState Hook
Thay đổi giao diện với State và useState Hook (phần 2)
Thay đổi giao diện với State và useState Hook (phần 3)
Modern React From The Beginning
Vite Build Tools
Props & Component Composition
useState with Inputs & Form Submission
useEffect, useRef & Local Storage
Async / Await and Http Request in React
React Router: Declarative Mode
ContextAPI
React Router: Framework Mode
File-routing & HTML Layouts
Server-side Data Query
Links & Navigation
Loaders
PHP
gruntJS
composer
MySQL
Thiết lập Cloudflare Turnstile chống spam trong PHP
Docker
Container Basics
Container Networking
Container Image
Container Volume & Persistent Data
Dockerfile
Docker Compose
Docker Registry
Payload CMS
youhoc
/
...
/
Props & Component Composition
Share
Explore
Props & Component Composition
Props are a way to pass data from a parent component to a child component.
They are similar to function arguments in JavaScript.
They also work like HTML attributes.
Basic Props
Default Props
Advanced Props & Components Composition
Quy tắc:
Parent components QUẢN LÝ state top-down ở level gần nhất.
Modal không quan tâm đến quản lý state như thế nào, nó chỉ nên quan tâm đến việc mở hay đóng thôi.
Không để state hay fn ở modal, mà nên để ở parent
Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
Ctrl
P
) instead.