Skip to content

Instantly share code, notes, and snippets.

View johnmpost's full-sized avatar

John Post johnmpost

View GitHub Profile
@johnmpost
johnmpost / library.ts
Created June 9, 2024 22:49
client-server api architecture using @effect/schema and integrating with @tanstack/react-query
import { pipe, Schema, Ef, A, O, flow } from "./toolbox";
import { CannotConnectToHost } from "./errors";
import {
useMutation,
UseMutationOptions,
useQuery,
UseQueryOptions,
QueryKey,
} from "@tanstack/react-query";
@johnmpost
johnmpost / $portfolio.md
Last active May 12, 2023 21:55
Insight - Individual Portfolio

John Post Individual Portfolio

For each selection, I have pulled out code snippets. The full files that these snippets are from are provided below. All the code in the snippets is code that I claim, whether I wrote it myself or collaborated with someone else.

Selection 1: The Result Module

export type Result<TSuccess> =
  | {
      kind: "success";