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

chore(examples): updated the example of with-react-jss to utlize the App router #74440

Open
wants to merge 2 commits into
base: canary
Choose a base branch
from

Conversation

Manoj-M-S
Copy link
Contributor

This PR updates the with-react-jss example to use the App Router. Here are the changes that have been made:

  • Renamed the pages folder to the app folder.
  • Converted the index.tsx to page.tsx file as part of the App Router.
  • Created layout.tsx in app directory, merging functionality from both _app.tsx and _document.tsx:
    • Wraps content with StyledComponentsRegistry
  • Created app/registry.tsx for JSS setup:
    • Moved JSS Provider and SheetsRegistry from _document.tsx
    • Moved style cleanup logic from _app.tsx
    • Handles server-side style generation
  • Updated the package.json file.

The following actions were performed as part of this PR:

  • Ran pnpm prettier-check with no issues found.
  • Executed the pnpm check-examples script.

CC: @samcx

@ijjk ijjk added the examples Issue was opened via the examples template. label Dec 31, 2024
@ijjk
Copy link
Member

ijjk commented Dec 31, 2024

Allow CI Workflow Run

  • approve CI run for commit: f1cd3c7

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples Issue was opened via the examples template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants