Is it ok to have MVC file structure inside a route (app router)?
Answered
Manx posted this in #help-forum
ManxOP
I'm so used to MVC pattern from Expressjs, but since Nextjs is adhering to React's philosophy of components, I feel like committing a war crime against the framework when using such approach.
I don't like long TSX components, so I wanna break them down, is there a standard I should follow?
I don't like long TSX components, so I wanna break them down, is there a standard I should follow?
Answered by Clown
Its upto you.
Models are usually defined separately anyways, the view(the component) is separate and obviously you can separate the controller(route handlers/server actions)
Models are usually defined separately anyways, the view(the component) is separate and obviously you can separate the controller(route handlers/server actions)
2 Replies
Its upto you.
Models are usually defined separately anyways, the view(the component) is separate and obviously you can separate the controller(route handlers/server actions)
Models are usually defined separately anyways, the view(the component) is separate and obviously you can separate the controller(route handlers/server actions)
Answer
@Clown Its upto you.
Models are usually defined separately anyways, the view(the component) is separate and obviously you can separate the controller(route handlers/server actions)
ManxOP
Thank you, I'll separate them as you suggested.