Q. Which of the following is true about useRef?

  • (A) It causes re-render on change
  • (B) It preserves a mutable reference
  • (C) It creates a new state
  • (D) It is used for performance optimization only
πŸ’¬ Discuss
βœ… Correct Answer: (B) It preserves a mutable reference
Explanation: useRef keeps a persistent mutable value that does not cause re-render when updated.
Explanation by: Mr. Dubey
useRef keeps a persistent mutable value that does not cause re-render when updated.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
78
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
95%
Success Rate