pixiv / charcoal

Design system library by pixiv
https://charcoal-web.pixiv.design/
Apache License 2.0
319 stars 35 forks source link

fix: avoid SSRProvider after react 18 #552

Closed yue4u closed 4 months ago

yue4u commented 4 months ago

やったこと

Render SSRProvider as Fragment if react version >= 18 to avoid the In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app. warning.

Similar code: https://github.com/search?type=code&q=%22import+%7B+version+%7D+from+%27react%27%22&p=1 Commit history on the react side: https://github.com/facebook/react/commits/main/packages/shared/ReactVersion.js

動作確認環境

チェックリスト

不要なチェック項目は消して構いません