FAQ
Why use vite
Because I'm used to it, but I might try rsbuild
Why ofetch
Because Type Friendly article can get the type directly, axios needs to process the interceptor
ts
const article = await ofetch<Article>(`/api/article/${id}`);Why react-query
Because I don't like the conditional fetching syntax of swr
ts
// Conditional fetching
const { data } = useSWR(shouldFetch ? '/api/data' : null, fetcher)
// ...or return a falsy valueWhy react-router
- Because I saw Innei implemented file routing based on
react-router - I tried
TanStack Routerbriefly, but I didn't like the API ofTanStack Router, so I switched back toreact-router - And I'm looking forward to the file routing of
react-router@v7 - Let the bullets fly, I'll try
TanStack Routerin the next few versions, or wait for the file routing ofreact-router@v7
Will there be a Next.js version
There may be one, but it will take some time, because I need to do something else, I currently only need the SPA version