Step 12 - components directory
Course: NextJS (Client side) - chapter 12
You should put all your components in a components directory and use them in the app routes rather than shoving everything in the route handler
- Create a new folder called
componentsin the root of the project - Add a new component there called
Signin.tsx - Move the signin logic there
- Render the
Signincomponent inapp/(auth)signin/page.tsx
Solution
`components/Signin.tsx`
$1b`app/(auth)/Signin.tsx`
import { Signin as SigninComponent } from "@/components/Signin";
export default function Signin() { return <SigninComponent />}