Closures และการใช้งานจริง
Closure เก็บ state ไว้ใน scope ของ function และมีประโยชน์กับ event handler, private variable, และ callback ที่ต้องการค่าเดิม.
This is the place to save the important ideas from tutorials, code videos, and lessons — short, clear, and easy to revisit later.
This week
Closures, hoisting, async/await
Hooks, state flow, props
Console, breakpoints, root cause
Recent notes
Closure เก็บ state ไว้ใน scope ของ function และมีประโยชน์กับ event handler, private variable, และ callback ที่ต้องการค่าเดิม.
State ควรใช้สำหรับข้อมูลที่เปลี่ยนจาก interaction ของผู้ใช้ เช่น form input, toggle, modal และแสดงผลที่ขึ้นอยู่กับข้อมูลนั้น.
เริ่มจาก reproduce bug, check input, inspect state, วาง breakpoint, และค้นหาความสัมพันธ์ระหว่างข้อมูลกับ UI ก่อนแก้ไข.
Topics
Layout, spacing, responsive design, patterns.
Logic, DOM, async, functional thinking.
Hooks, component structure, UI flow.
How to break down bugs and find root cause.
Personal knowledge base
You can write summaries from YouTube lessons, coding tutorials, or your own experience and keep them in one organized space.