Repository inventory

whatiskadudoing/fp-ts-skills

Skills indexed from this repository, with install-style signals scoped to the repo.
13 skills26 GitHub stars0 weekly installsGitHubOwner profile

Overview

This skill provides practical, no-jargon patterns for using fp-ts with React (hooks, state, forms, data fetching, and dependency injection). It targets React 18/19 and Next.js 14/15 and focuses on code that is easy to apply in real apps. Examples cover Option, Either, TaskEither, RemoteData, stability, and ReaderTaskEither wiring for testable components.

How this skill works

The content shows concrete patterns and small utilities: use Option for optional state, Either for validation, TaskEither for fallible async calls, and a RemoteData state machine for clear async UI. It demonstrates hooks and helpers (useFetch, useRemoteData, stable memoization) and how to inject dependencies via Context with ReaderTaskEither for testable components. Each pattern includes minimal code and reasons for the choice so you can copy and adapt quickly.

When to use it

  • Replace null/undefined UI state with Option when a value may be absent
  • Use Either to validate forms and collect field-level errors
  • Wrap API calls in TaskEither to model async failures explicitly
  • Adopt RemoteData when you need an unambiguous async state machine
  • Use ReaderTaskEither and Context to inject services for easier testing

Best practices

  • Prefer pipe to chain transformations and keep intent explicit
  • Collect validation errors with applicative Either for better UX
  • Memoize fp-ts values or use equality-aware hooks to prevent needless re-renders
  • Model async UI as RemoteData to avoid impossible boolean combinations
  • Keep side-effectful code in hooks and inject external services via context

Example use cases

  • A signup form that shows field-level errors and collects all validation failures
  • A reusable useFetch hook built on TaskEither with clear loading/error handling
  • A dashboard that composes multiple API calls in parallel using ApplyPar
  • A profile component that stores optional user state with Option and avoids re-render churn
  • An app wired with AppProvider that injects API and analytics mocks for unit tests

FAQ

Yes. Patterns show both hook-based fetching and examples that use Promise-based data with use() and Suspense for React 19.

Will using fp-ts cause excessive re-renders?

Not if you memoize fp-ts values or use equality-aware helpers. The skill explains useMemo and fp-ts-react-stable-hooks to avoid reference-equality issues.

13 skills

fp-react
Data

This skill helps you apply functional programming patterns in React apps using fp-ts, improving state, forms, and data fetching.

DebuggingFrontendReactTypescript
fp-compose
Data

This skill helps you compose TypeScript functions into readable pipelines using pipe and flow for clear, maintainable data transformations.

DebuggingFrontendPerformanceReact+2
fp-data-transforms
Analytics

This skill helps you transform arrays and objects with functional patterns, enabling safer access, grouping, and normalization for real-world data.

DataDebuggingReactRefactor+1
fp-taskeither-ref
Api

This skill provides quick TaskEither patterns for async error handling, API calls, and Promise-based workflows using fp-ts.

BackendDebuggingJavascriptReact+1
fp-async
Api

This skill helps you build robust async pipelines with TaskEither, replacing try/catch chaos and improving error handling across APIs.

AutomationBackendDebuggingReact+2
fp-refactor
Code Review

This skill helps you migrate imperative TypeScript code to fp-ts patterns, enabling explicit errors, safe optional handling, and functional composition.

DebuggingReactRefactorTypescript
fp-pragmatic
Ai

This skill helps you apply practical fp-ts patterns to write clearer, safer TypeScript code with minimal jargon and maximal 80/20 impact.

BackendCode ReviewDebuggingFrontend+3
fp-pipe-flow
Api

This skill helps you master function composition in fp-ts using pipe and flow to build elegant, type-safe data pipelines.

DataDebuggingProductivityReact+2
fp-errors
Backend

This skill helps you implement robust error handling with fp-ts by returning errors as values and chaining safely.

DebuggingReactTypescript
fp-either-ref
Api

This skill helps you handle typed errors and validation with Either in TypeScript, enabling safe, composable error handling patterns.

JavascriptReactTypescript
fp-task-either
Api

This skill enables type-safe async error handling with TaskEither patterns in TypeScript, enabling composable, lazy operations and robust error recovery.

BackendReactTypescript
fp-immutable
Debugging

This skill guides practical immutability patterns in TypeScript to safely update state and reduce bugs across arrays and objects.

FrontendReactScriptingTypescript
fp-fundamentals
Ai

This skill teaches pure functions, currying, and composition to improve predictability, testability, and maintainable code in TypeScript and FP patterns.

DebuggingReactRefactorTesting+1
More from this maintainer
Other repositories and skills published under the same GitHub owner.
Skills library
Jump back to the full directory or explore grouped topics.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational