Shopify / quilt

A loosely related set of packages for JavaScript/TypeScript projects at Shopify
MIT License
1.7k stars 220 forks source link

Update quilt_rails (possibly react-server) to be compatible with react@18. #2264

Open KevinMind opened 2 years ago

KevinMind commented 2 years ago

Overview

Original slack thread: https://shopify.slack.com/archives/C01H7LC0EEL/p1650556018972339

TLDR; projects using quilt_rails will have client side hydration errors when using react 18 which deprecates reactDOM.hydrate.

Given: react 18 is installed When: hydrating the client Then: use hydrateRoot instead of hydrate

We should update our client to use hydrateRoot when we detect react@18 is being used.

Consuming repo

repo: https://github.com/Shopify/m2m-prototype

PR: https://github.com/Shopify/m2m-prototype/pull/53

Checklist

jas7457 commented 1 year ago

Hey @KevinMind I was curious if you had any updates with this. I'm facing this same issue today. The repo and PR you linked show a 404 if I click on them, by the way.