React · Senior · Question 56 of 75
When is suppressHydrationWarning appropriate?
<time suppressHydrationWarning>{new Date().toLocaleTimeString()}</time>- ✓Correct answer: For unavoidable text differences in one element, like timestamps - it works one level deep only
- 2To silence all hydration errors in the app
- 3To skip hydration of a subtree for performance
Explanation
It doesn't fix the mismatch; React keeps the server text. For content that must differ on the client, render it after mount (effect) or move it to client-only rendering.