-
-
Notifications
You must be signed in to change notification settings - Fork 311
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
[cli] Add framework selection to support Vite #4545
base: master
Are you sure you want to change the base?
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.
Looks good, just some general suggestions, nothing too specific to the implementation that I could notice!
@@ -176,30 +176,157 @@ For a full working example, see the [Toolpad Core Vite app with React Router exa | |||
|
|||
## (Optional) Set up authentication | |||
|
|||
You can use the `SignInPage` component to add authentication along with an external authentication provider of your choice. The following code demonstrates the code required to set up authentication with a mock provider. | |||
You can use the `SignInPage` component to add authentication along with an external authentication provider of your choice. The following code demonstrates the code required to set up authentication with Firebase. | |||
|
|||
### Define a `SessionContext` to act as the mock authentication provider |
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's no longer a mock, right?
|
||
This template provides a minimal setup to get React working in Vite with HMR. | ||
This example provides a minimal setup to get Toolpad Core working in Vite with HMR, as well as routing with React Router and a mock authentication setup. |
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.
Maybe we don't need this example anymore now that we have the Firebase one?
Or we can keep it if this one is more extendable, not sure.
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 feel like it's okay to preserve the barebones example just to demonstrate the minimum requirements to get auth working
|
||
let routerOption: SupportedRouter | undefined; | ||
|
||
if (frameworkOption === 'nextjs') { |
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.
Maybe the router and framework choice could be the same menu of choices? Unless we plan to have a lot of options for both in the future i guess...
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.
My preference would be to keep the options list short, so Next.js or Vite? -> App Router or Pages Router?
Netlify deploy preview |
create-toolpad-app
#4235