-
Notifications
You must be signed in to change notification settings - Fork 386
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
Rearrange exports for RSC and add experimental RSC route to example #913
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
src/client/index.ts
Outdated
WithPageAuthRequiredProps, | ||
WithPageAuthRequiredOptions | ||
} from './with-page-auth-required'; | ||
export { ConfigProvider, ConfigProviderProps, useConfig }; |
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.
Do we want to export useConfig
given that it's only used internally?
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.
Same for ConfigProvider
and ConfigProviderProps
.
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.
Yeah, that's a fair point, will fix
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.
examples/kitchen-sink-example/app/profile-experimental-rsc/page.tsx
Outdated
Show resolved
Hide resolved
|
||
const Header = (): React.ReactElement => { | ||
const { user } = useUser(); | ||
|
||
return ( | ||
<header> | ||
<div id="header"> |
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.
Nit: should this be a <nav>
?
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.
It should be a <header>
- but the Server Component renderer was throwing errors on <header>
, so I changed it to a <div>
Co-authored-by: Rita Zerrizuela <zeta@widcket.com>
📋 Changes
/frontend
->/client
to align with Next.js/client
(egimport { useUser } from '@auth0/nextjs-auth0/client'
) because server components can't import client code/middleware
->/edge
(egimport { withMiddlewareAuthRequired } from '@auth0/nextjs-auth0/edge'
) because this export will include code that can run on the Edge runtime in Server Components and API Routes in addition to Middleware.