Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid SSRProvider after react 18 #552

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

yue4u
Copy link
Contributor

@yue4u yue4u commented Jun 4, 2024

やったこと

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

動作確認環境

チェックリスト

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

  • 破壊的変更がある場合には、対象のパッケージのメジャーバージョンが上がっていることを確認した
  • 追加したコンポーネントが index.ts から再 export されている
  • README やドキュメントに影響があることを確認した

@yue4u yue4u force-pushed the fix/avoid-ssrprovider-for-react-18 branch 2 times, most recently from 1e0bd6a to 52b853d Compare June 4, 2024 13:11
@yue4u yue4u force-pushed the fix/avoid-ssrprovider-for-react-18 branch from 52b853d to 7f9b457 Compare June 4, 2024 13:12
@toshusai toshusai added the patch label Jun 5, 2024
Copy link
Contributor

@toshusai toshusai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. LGTM!

@toshusai toshusai merged commit 7319d92 into pixiv:main Jun 5, 2024
12 of 13 checks passed
@yue4u yue4u deleted the fix/avoid-ssrprovider-for-react-18 branch June 5, 2024 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants