DEV Community

Amirmahdi Sultani
Amirmahdi Sultani

Posted on

πŸ€” what i was thinking of was having the experience of using next.js routing in react

πŸ€” what i was thinking of was having the experience of using next.js routing in react

πŸš€ therefore upcoming.js β€” was born

if you use React + Vite you know this pain.
every new project. every new route. same boilerplate:


} />
} />
} />


every. single. time.

meanwhile Next.js developers just create a folder
and the route exists. no imports. no declarations. nothing.

i wanted that. but i didn't want Next.js.
i wanted React. i wanted Vite. i wanted freedom.

so i built upcoming.js.

a Vite plugin that brings Next.js-style file routing
to any React + Vite project. no framework. no lock-in.
just the one feature that actually matters.
src/
β”œβ”€β”€ page.jsx β†’ /
β”œβ”€β”€ about/
β”‚ └── page.jsx β†’ /about
└── blog/
└── [id]/
└── page.jsx β†’ /blog/:id
that's your entire router.
create a folder β†’ route appears instantly.
delete a folder β†’ route is gone.
no restarts. no imports. no boilerplate. ever.

and since it's built on React Router under the hood β€”
useParams, useNavigate, Link β€” everything works
exactly the way you already know.

no new APIs. no new concepts.
just folders.

npm i upcoming.js

πŸ“¦ npm β†’ npmjs.com/package/upcoming.js
πŸ™ github β†’ github.com/amirmahdi1390/upcoming.js

if this saves you time, drop a ⭐️ on github.
it means a lot for a first time package author πŸ™

Top comments (1)

Collapse
Β 
amirmahdi01 profile image
Amirmahdi Sultani β€’

give a try to this and enjoy having new way for routing