vi.react.dev
vi.react.dev copied to clipboard
feat(i18n): src/content/learn/reusing-logic-with-custom-hooks.md from English to Vietnamese
🇻🇳 Vietnamese Translation: Reusing Logic with Custom Hooks
Hi! I'm contributing as a volunteer translator for vi.react.dev, and this PR adds the Vietnamese translation for the "Reusing Logic with Custom Hooks" lesson.
What's included
- Vietnamese translation of reusing-logic-with-custom-hooks.md
- Preserved all code examples and markdown formatting
- Kept terminology consistent with existing translations
Changes
- ✅ Fully translated the guide covering custom Hook creation, stateful logic sharing, reactive value passing, event handler management, and Hook composition patterns
- ✅ Maintained code blocks, links, Sandpack components and Challenge/Solution sections
- ✅ Verified all internal links and formatting render correctly
Looking forward to contributing more translations to the project! 🚀
Tóm tắt những gì đã được dịch:
Tiêu đề và phần Intro: "Reusing Logic with Custom Hooks" → "Tái Sử Dụng Logic với Custom Hooks"
Các phần chính:
- "Custom hooks: sharing logic between components" → "Custom Hook: Chia sẻ logic giữa các component"
- "Extracting your own custom Hook from a component" → "Trích xuất custom Hook của riêng bạn từ một component"
- "Hook names always start with use" → "Tên Hook luôn bắt đầu bằng
use" - "Custom hooks let you share stateful logic, not state itself" → "Custom Hook cho phép bạn chia sẻ logic stateful, không phải bản thân state"
- "Passing reactive values between Hooks" → "Truyền giá trị reactive giữa các Hook"
- "Passing event handlers to custom Hooks" → "Truyền event handler cho custom Hook"
- "When to use custom Hooks" → "Khi nào nên sử dụng custom Hook"
- "Custom Hooks help you migrate to better patterns" → "Custom Hook giúp bạn di chuyển sang các pattern tốt hơn"
- "There is more than one way to do it" → "Có nhiều cách để thực hiện điều đó"
Phần Challenges:
- "Extract a useCounter Hook" → "Trích xuất Hook
useCounter" - "Make the counter delay configurable" → "Làm cho delay của counter có thể cấu hình"
- "Extract useInterval out of useCounter" → "Trích xuất
useIntervalra khỏiuseCounter" - "Fix a resetting interval" → "Sửa lỗi interval bị reset"
- "Implement a staggering movement" → "Triển khai staggering movement"