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

Web "React is not defined" Fix #2941

Merged

Conversation

nathan-ahn
Copy link
Contributor

Issue/Fix

We were running into a "React is not defined" error using Skia on web for both Next.js and Storybook. This PR re-introduces the React import that previously existed before the new web reconciler in Canvas.tsx. One thing that I'm not sure about is if auto-format will remove this import. I don't have formatting working on my local repository, so I can't test. We don't want to accidentally regress when a developer formats this file.

Test Plan

Patch allows for Skia rendering in both Next.js and Storybook. I can't verify full functionality since our web animations are broken in some newer version, but animation issues seem unrelated to this "React is not defined" issue. We're at least able to render static screens with this patch.

@wcandillon
Copy link
Contributor

@nathan-ahn that's a fair change indeed.

@wcandillon wcandillon self-requested a review February 5, 2025 19:15
@wcandillon wcandillon merged commit c6d81c4 into Shopify:main Feb 5, 2025
8 checks passed
Copy link
Contributor

github-actions bot commented Feb 5, 2025

🎉 This PR is included in version 1.11.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

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