Q. What will happen if you modify state directly in React?

  • (A) Component re-renders correctly
  • (B) State change is ignored
  • (C) React throws an error
  • (D) Component may behave unexpectedly
πŸ’¬ Discuss
βœ… Correct Answer: (D) Component may behave unexpectedly
Explanation: Direct state mutation can lead to bugs and unpredictable behavior.
Explanation by: Mr. Dubey
Direct state mutation can lead to bugs and unpredictable behavior.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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