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

Add missing react imports in examples #2371

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

r100-stack
Copy link
Member

Changes

@mayank99 noticed that when some examples (e.g. Panels's examples) were opened in CodePen from the docs site, the following error is encountered: ReferenceError: React is not defined.

To avoid this error in those examples, React imports are added to the examples that were missing it.

In the future, as @mayank99 suggested, we could even have a lint rule to easily ensure this react import is there.

Testing

  • Confirmed that no example is missing a react import.
  • Confirmed that the Panels examples and the other examples that were missing the react import now open properly in CodePen.

Docs

N/A

After PR TODOs

  • Try having lint rules to make sure react imports are there in all examples

@r100-stack r100-stack self-assigned this Dec 12, 2024
@r100-stack r100-stack marked this pull request as ready for review December 12, 2024 00:30
@r100-stack r100-stack requested a review from a team as a code owner December 12, 2024 00:30
@r100-stack r100-stack requested review from mayank99 and smmr-dn and removed request for a team December 12, 2024 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant