Tagged articles
15 articles
Page 1 of 1
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Oct 2, 2024 · Frontend Development

Understanding Vue 3 ref, computed, and reactive: Definitions, Usage, and Best Practices

This article explains the purpose and internal implementation of Vue 3’s ref, computed, and reactive APIs, compares their behaviours in script and template contexts, discusses watch strategies, and offers practical guidelines for choosing and modularising these reactive primitives in large‑scale frontend projects.

RefVue3computed
0 likes · 16 min read
Understanding Vue 3 ref, computed, and reactive: Definitions, Usage, and Best Practices
Alibaba Cloud Developer
Alibaba Cloud Developer
Aug 9, 2024 · Frontend Development

Mastering useRef in React with TypeScript: Avoid Common Pitfalls

This article explains how to correctly use React's useRef hook with TypeScript across several real‑world scenarios, compares different initialization patterns, highlights typical mistakes with useLayoutEffect, and provides best‑practice solutions for forwarding refs, merging refs, and exposing imperative handles.

ReactRefTypeScript
0 likes · 13 min read
Mastering useRef in React with TypeScript: Avoid Common Pitfalls
政采云技术
政采云技术
Aug 16, 2023 · Frontend Development

Why rc-form Fields Do Not Disappear: The Importance of Ref Callbacks and clearField in Custom Components

This article explains why fields registered with rc-form may persist and continue to run validation when using functional custom components, analyzes the internal mechanisms of getFieldMeta, clearField, and saveRef, and shows that adding forwardRef support resolves the disappearance and validation issues.

ReactRefcustom components
0 likes · 14 min read
Why rc-form Fields Do Not Disappear: The Importance of Ref Callbacks and clearField in Custom Components
php Courses
php Courses
Dec 12, 2021 · Frontend Development

Understanding Vue 3 Composition API: Ref, Reactive, toRefs, Computed, Watch, Provide/Inject, and Lifecycle Hooks

This article explains Vue 3's Composition API, covering how to create reactive data with ref and reactive, use toRefs, define computed properties, apply readonly, watch and watchEffect, handle lifecycle hooks, pass props, and share state via provide and inject, all with practical code examples.

Composition APIJavaScriptRef
0 likes · 8 min read
Understanding Vue 3 Composition API: Ref, Reactive, toRefs, Computed, Watch, Provide/Inject, and Lifecycle Hooks
KooFE Frontend Team
KooFE Frontend Team
Aug 11, 2021 · Frontend Development

How to Make React Effects Work Correctly in Strict Mode

This article explains how React's Strict Effects mode double‑invokes effects and layout effects during mount and unmount, and provides practical patterns using refs, cleanup functions, and focus management to ensure components behave correctly when effects run multiple times.

FocusReactRef
0 likes · 10 min read
How to Make React Effects Work Correctly in Strict Mode