Skip to content

Instantly share code, notes, and snippets.

View SwiftedMind's full-sized avatar

Dennis Müller SwiftedMind

View GitHub Profile
@SwiftedMind
SwiftedMind / route.tsx
Created November 11, 2023 17:29
Request Validation in Next.js
import { ZodError, z } from "zod";
interface RequestBody {
name: string;
}
const RequestBody = z.object({
name: z.string(),
});
@SwiftedMind
SwiftedMind / Models.swift
Last active March 27, 2023 08:25
Puddles Architecture - Queryable Demo
import SwiftUI
import Puddles
struct Item: Identifiable {
var id = UUID()
var name: String
static var draft: Self { .init(name: "") }
}
@MainActor