React 17 Hydrate To Hydrate Root

/icons/calendar.svg

Last update

Aug 15, 2024

Short description

Detailed description

Example

Before

import { hydrate } from 'react-dom';
hydrate( < App / > , document.getElementById('root'));

After

import { hydrateRoot } from 'react-dom/client';
hydrateRoot(document.getElementById('root'), < App / > );

Build custom codemods

Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community

background illustrationGet Started Now