-
Notifications
You must be signed in to change notification settings - Fork 77
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
[PFX-637] Support create App Router #777
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update with the latest from my PR that fixed Page Router rendering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
export default function RootLayout({ children }) { | ||
return ( | ||
<html lang='en'> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't presume lang='en'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eslint looks for a lang value here <html> elements must have the lang prop jsx-a11y/html-has-lang
.
What would be a good default for this?
Would en
be safe for the boilerplate code?
]); | ||
|
||
newContext.useAppRouter = useAppRouter; | ||
newContext.nextServerType = 'defaultServer'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this line get skipped if useAppRouter
was already in the context? What would happen if nextServerType
was not initialized?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a check outside of the useAppRouter prompt
if (newContext.useAppRouter) {
newContext.nextServerType = 'defaultServer';
}
Summary
Added prompt to use App Router with the Gasket Nextjs plugin.
It does not currently work with Redux. This needs to be addressed in a separate ticket. We also need to port any logic from
_app
and_document
files in a separate ticket.I also removed the generated test from the cypress plugin. This test was conflicting with the generated cypress test in the nextjs plugin.
Changelog
@gasket/plugin-cypress
@gasket/plugin-nextjs
Test Plan