Skip to content

Implement robust hydration warning system #289

@brainkim

Description

@brainkim

Crank currently implements hydration but lacks a robust hydration warning system, which is present in frameworks like React. Hydration warnings are important for detecting mismatches between server-rendered and client-rendered DOM, helping developers debug hydration issues and ensuring consistent user experiences.

Feature requirements:

  • Add a warning system to detect hydration mismatches between server and client renders.
  • Emit clear, actionable warnings in the console when mismatches occur.
  • Provide documentation or examples for interpreting and troubleshooting hydration warnings.
  • (Optional) Allow configuration to enable/disable or adjust the verbosity of warnings.
  • Implement a suppressHydrationWarnings attribute (similar to React) to allow developers to intentionally suppress hydration warnings on specific elements when mismatches are expected or acceptable.

This feature would improve developer experience and bring Crank more in line with established best practices in JavaScript frameworks.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions