> For the complete documentation index, see [llms.txt](https://personal-space-4.gitbook.io/complete-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://personal-space-4.gitbook.io/complete-guide/instructor_notes_gitbook/detailed-live-coding-script.md). Agents can also search and read this documentation through its [MCP server](https://personal-space-4.gitbook.io/complete-guide/~gitbook/mcp).

# Detailed Live Coding Script

- [Pembukaan](https://personal-space-4.gitbook.io/complete-guide/instructor_notes_gitbook/detailed-live-coding-script/pembukaan.md): Opening script dan project tour.
- [Step 1 — useState (State Management)](https://personal-space-4.gitbook.io/complete-guide/instructor_notes_gitbook/detailed-live-coding-script/step-1-usestate-state-management.md): Setup state dasar (messages, status, error).
- [Step 2 — Event Handlers & Async Operations](https://personal-space-4.gitbook.io/complete-guide/instructor_notes_gitbook/detailed-live-coding-script/step-2-event-handlers-and-async-operations.md): handleSend, immutable update, async flow.
- [Step 3 — Error Handling](https://personal-space-4.gitbook.io/complete-guide/instructor_notes_gitbook/detailed-live-coding-script/step-3-error-handling.md): Error sebagai UI state + recovery.
- [Step 4 — useEffect (Side Effects)](https://personal-space-4.gitbook.io/complete-guide/instructor_notes_gitbook/detailed-live-coding-script/step-4-useeffect-side-effects.md): useEffect timing dan dependencies.
- [Step 5 — useRef (DOM References)](https://personal-space-4.gitbook.io/complete-guide/instructor_notes_gitbook/detailed-live-coding-script/step-5-useref-dom-references.md): useRef untuk DOM + implement auto-scroll.
- [Step 6 — Custom Hook Refactoring](https://personal-space-4.gitbook.io/complete-guide/instructor_notes_gitbook/detailed-live-coding-script/step-6-custom-hook-refactoring.md): Ekstrak logic ke custom hook useChat.
- [Local Storage](https://personal-space-4.gitbook.io/complete-guide/instructor_notes_gitbook/detailed-live-coding-script/local-storage.md)
