Next.js Discord

Discord Forum

Is there anyway to create routing without using App Router in Next.js

Unanswered
Hokkaido posted this in #help-forum
Open in Discord
HokkaidoOP
I'm trying to create an app with turborepo to use packages. Each package is supposed to be a self functioning entity with its own routing and wrt to its root path assigned by the main app to the package wherever it is called.
How can I route the package without having to create a folder structure ?

15 Replies

I don't think you can
How about creating the route and import the package?
HokkaidoOP
I watched a video on Jack Herrington's Youtube about the Lego Blocks Architecture of Next.js with TurboRepo. https://youtu.be/xoVpFAXBats?si=E7ey6ABMk1lr7wqS
I've been trying to conceptualize the same Blogs application with Turborepo where the package can have other routes nested within it
Like for example, I would want to keep the form for creating the Blogs in a new route /blogs/create, the display all Blogs in the /blogs route and view a single blog in the /blogs/[slug] route. I haven't been very successful with it.
How can we implement such a Lego Brick Architecture for Blogs ?
have you checked his repo? he is creating the route file and importing the package
HokkaidoOP
I know, It works fine
I meant that the packasge should have all the functionality of all routes under /blogs route
well, as far as I know we can't do that with next
HokkaidoOP
: )
:___ )
that's how nextjs routing work
HokkaidoOP
There is no routing without the file and folder routing at all right ??
no
HokkaidoOP
not even with React Router ?
or you use react-router
HokkaidoOP
Jinx lol
But yeah
I guess I should try it