Toolverse
All skills

fp-ts-react

by sickn33

Practical patterns for using fp-ts with React - hooks, state, forms, data fetching. Use when building React apps with functional programming patterns. Works with React 18/19, Next.js 14/15.

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Author
sickn33
Category
Frontend
Views
1

About this skill

Practical patterns for using fp-ts with React - hooks, state, forms, data fetching. Use when building React apps with functional programming patterns. Works with React 18/19, Next.js 14/15.

How to use

  1. Zainstaluj fp-ts w swoim projekcie React: npm install fp-ts. Skill zawiera gotowe wzorce – nie wymaga osobnej instalacji, a raczej pokazuje, jak strukturować kod.

  2. Zapoznaj się z podstawowymi typami: Option dla wartości, które mogą nie istnieć (np. zalogowany użytkownik), Either dla operacji, które mogą się nie powieść (np. walidacja), TaskEither dla asynchronicznych operacji (np. zapytania API).

  3. Zastosuj Option w stanie komponentu zamiast null | undefined. Zdefiniuj stan jako useState<O.Option>(O.none), a następnie użyj O.match() do obsługi obu przypadków – gdy wartość istnieje i gdy jej brak.

  4. Dla walidacji formularzy użyj Either, aby zwrócić albo błędy (Left), albo poprawne dane (Right). Skill pokazuje, jak gromadzić wiele błędów walidacji w jednym miejscu.

  5. W zapytaniach do API zastosuj TaskEither, aby obsłużyć trzy stany: ładowanie, błąd i sukces. Skill zawiera wzorce do wyświetlania komunikatów ładowania i obsługi błędów sieciowych.

  6. Łącz transformacje za pomocą pipe() – funkcja z fp-ts, która pozwala czytać kod od góry do dołu i unika zagnieżdżonych nawiasów.

Related skills

better-icons

by better-auth

Use when working with icons in any project. Provides CLI for searching 200+ icon libraries (Iconify) and retrieving SVGs. Commands: `better-icons search u003cqueryu003e` to find icons, `better-icons get u003cidu003e` to get SVG. Also available as MCP server for AI agents.

Frontend
2037

theme-factory

by anthropics

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

Frontend
40139

shadcn-ui-setup

by maneeshanif

Install and configure Shadcn/ui component library with Radix UI primitives, Aceternity UI effects, set up components, and manage the component registry. Use when adding Shadcn/ui to a Next.js project or installing specific UI components for Phase 2.

Frontend
23167

landing-page-guide-v2

by bear2u

Create distinctive, high-converting landing pages that combine proven conversion elements with exceptional design quality. Build beautiful, memorable landing pages using Next.js 14+ and ShadCN UI that avoid generic AI aesthetics while following the 11 essential elements

Frontend
3486

browser-use

by browser-use

Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, or extract information from web pages.

Frontend
23107

shadcn-ui

by josechifflet

shadcn/ui component patterns for Next.js 16 applications. This skill should be used when adding UI components, customizing component styles, composing primitives, or integrating forms with react-hook-form. Covers installation, customization, composition patterns, and

Frontend
157206