Provide a hook for hydration mismatch (__DEV__ only) or a way to customize `handleMismatch`
What problem does this feature solve?
Hi 👋 I'm currently working on a module to improve DX for nuxt, its main goal is to help devs with hydration.
Currently, when a hydration mismatch happens, we don't really have any idea of why it is happening (except having a string logged in console).
What i'd like to do is to have a hook that can be triggered with informations about what went wrong, the parentComponent , the vnode and DOM element could be provided.
What does the proposed API look like?
I think a onHydrationMismatch()
function that could be a __DEV__
only hook would be nice to have.
Or
just being able to customize the handleMismatch() function of createHydrationFunctions()