- This is a Next.js (13.4.10) application
- The UI/CSS framework or library is: shadcn/ui (https://ui.shadcn.com/docs/installation/next)
- The Clerk Service is used toe ease the user authentication
ESLint shows error messages at next.config.js and tailwing.config.js
Add the following in the .eslintrc.json file:
{
"extends": ["next/babel", "next/core-web-vitals"]
}
Unknown yet...
Add the following after the Tailwing directives
{
hmtl,
body,
:root {
height: 100%;
}
}
Hydration errors in Next.js (or any React application) occur when the server-rendered HTML does not match the client-rendered output.
See: @components/myComps/HOC/withClientSideRendering
This methods escapes the hydration error by making both server & client initial renders return null. But it is NOT consider a best practise!
- Press Ctrl+Shift+P
- Type Preferences: Configure User Snippets and select it.
- Click on the + New Global Snippet file and give it a name, e.g., "MySnippets".
- In the opened .json file, paste the following snippet:
"Tailwind cn Function": {
"prefix": "twcn",
"body": ["className={cn(\"$1\", $2)}"],
"description": "Generates cn function for merging tailwindcss classes"
}
- Save the file.
- Recommend use:
<div (type here twcn...)>
- Fix: Got to components/ui/input.tsx -> and remove the "focus-visible:ring-2" utility class