Marnix Janssen
marnixjanssen.com
Marnix Janssen
@marnixjanssen.com
Typescript and Rust @ https://pola.rs
Next.js works quite well with this setup tbh. Using the middleware and the route.ts routes that it offers, a lot of code that should be handled server-side, is handled server side.
December 1, 2024 at 8:31 PM
Mostly CSR, but all authentication stuff is handled server-side. Building dynamic dashboards is quite difficult using SSR.
December 1, 2024 at 8:30 PM
This is nice! I like the fact that queries are defined in a separate queries directory
November 25, 2024 at 5:16 PM
eg.

- /data/queries/user.ts

import { queryOptions } form '@tanstack/react-query'

export const getPosts = queryOptions({
queryKey: ['posts'],
queryFn: getPosts,
})

- /components/feed.tsx

import { getPosts } from '/data/queries/user.ts'

const { data: posts } = useQuery(getPosts)
November 25, 2024 at 11:00 AM