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

[Doc] Fix NextJS tutorial for the latest version of create-next-app #8938

Merged
merged 2 commits into from
May 26, 2023

Conversation

djhi
Copy link
Collaborator

@djhi djhi commented May 23, 2023

No description provided.

// build the CRUD request based on the incoming request
const url = `${process.env.SUPABASE_URL}/rest/v1/${requestUrl}`;
const options = {
const options: RequestInit = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This TS annotation won't work with a jsx syntax highlighting

@@ -12,7 +12,7 @@ React-admin runs seamlessly on [Next.js](https://nextjs.org/), with minimal conf
Let's start by creating a new Next.js project called `nextjs-react-admin`.

```bash
npx create-next-app --ts nextjs-react-admin --use-yarn
npx create-next-app@latest next-admin --ts --use-yarn --eslint --no-tailwind --no-src-dir --no-app --import-alias "@/*"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we adapt the tutorial to work for the default setup instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the default setup?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure ;)

It's just that the --no-src-dir --no-app feels like we're opting out of the improvements of Netx.js 13. Or am I mistaken?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's answering no at a question asked by the CLI, just like the --no-tailwind. You either opt in or out for each question with a flag or the CLI will ask it

@fzaninotto fzaninotto changed the title Update NextJS tutorial [Doc] Fix NextJS tutorial for the latest version of create-next-app May 26, 2023
@fzaninotto fzaninotto merged commit 83aa214 into master May 26, 2023
@fzaninotto fzaninotto deleted the update-next-tutorial branch May 26, 2023 15:29
@fzaninotto fzaninotto added this to the 4.11.1 milestone May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants