
Dzayr Cloud retweeted
Replying to @mjackson
fun fact: Remix 3 docs are already available at developer.mozilla.org/
why is it not possible to do something like this in @tanstack start?
i'm trying to create a utility server function to avoid recreating the same server function every time, but it looks like that's not possible, it seems that createServerFn has to be on top level otherwise it'll be included in the client bundle.
i think this would be much better DX then creating global middleware to then include it in every server function middleware array for type safety!
maybe a server function factory utility can make this possible!
cc @schanuelmiller @tannerlinsley
1
1
776
-- @better_auth should be renamed to best-auth.
Whatever authentication problem you think of, they've got you covered.
1
25
looks like @deno_land keeps losing to @bunjavascript
51
I think configuring page rendering in @tan_stack Start is a bit spread atm
configure Static rendering in vite.config.ts server.prerender
configure default SSR config in router.tsx, and per page ssr in the route's options
configure SPA mode in vite.config.ts spa.enabled
what if there was a one central place to configure the default rendering mode (maybe in router.tsx), and you can override each route config definition?
something like:
// router.tsx
export const createRouter = () => {
const router = createTanstackRouter({
routeTree,
defaultRendering: {
mode: 'ssr' // 'ssr' | 'static' | 'spa',
// other config...
})
return router
}
// some-route.tsx
export const Route = createFileRoute('/some-route')({
rendering: { mode: 'static' }, // or 'ssr' or any..
loader: () => {},
component: () => (<>some route</>),
})
@tannerlinsley @schanuelmiller
Listen up, @Tanstack Router isn't just good, it's the ONLY router for serious new apps, a no brainer. The power you get is frankly ridiculous.
39
working with @tan_stack Start's 'beforeLoad' and 'loader' is a bit tricky, they can both run on the server or on the client..
i was debugging an issue with @better_auth 's user session not being loaded correctly, it turned out that if the app is already loaded before navigating the loader's page, it works fine, but if i reload the page, authClient.getSession() won't return the session because it was being executed on the server where session cookies/headers are missing...
idk if i should handle both cases on the loader
'if (window !== undefined)
{// client handler}
else {// server handler}'
or that would ship server code to the client...
i think React Router v7 with 'loader' and 'clientLoader' is a cleaner DX
what do you think @tannerlinsley ??
1
84
For CI/CD, AI infra, and databases, @vercel offers a superior developer experience. With Vercel, you're building and shipping features. With @Cloudflare, you're battling configs.
33
hey @tannerlinsley
when will '@cloudflare/vite-plugin' be supported in Tanstack Start?
it would be a huge DX improvement!!
1
6
902
Dzayr Cloud retweeted
Web clients -> typescript
Web server -> typescript
Mobile -> typescript + react native
ML / AI -> python
Data science -> python











