Tag

Uncontrolled Component

1 views collected around this technical thread.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jan 5, 2025 · Frontend Development

Understanding Controlled vs Uncontrolled Components and Implementing the usePropsValue Hook in React

The article explains the difference between controlled and uncontrolled React components, introduces the usePropsValue custom hook to unify their handling, provides implementation details with code examples, and discusses optimization techniques to reduce unnecessary re-renders.

Controlled ComponentCustom HookUncontrolled Component
0 likes · 6 min read
Understanding Controlled vs Uncontrolled Components and Implementing the usePropsValue Hook in React
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
May 8, 2024 · Frontend Development

Understanding Controlled and Uncontrolled Components in React

This article explains the difference between controlled and uncontrolled components in React, illustrating when to use each approach, how defaultValue and value work, and provides practical code examples and a custom hook to support both modes in component development.

Controlled ComponentCustom HookUncontrolled Component
0 likes · 15 min read
Understanding Controlled and Uncontrolled Components in React