Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. PureScript
  3. purescript-thermite

purescript-thermite

MITPureScriptv5.0.0

A simple PureScript wrapper for React providing a clean API to the most commonly-used parts of React's functionality.

GitHubGitHub
348 stars52 forks0 contributors

What is purescript-thermite?

Thermite is a PureScript library that wraps React to provide a clean, functional API for building user interfaces. It simplifies React usage by exposing commonly needed features through a declarative component model based on actions and states, while allowing direct access to purescript-react for advanced cases.

Target Audience

PureScript developers building interactive web applications who want a functional, composable approach to React component development without the full complexity of React's API.

Value Proposition

Developers choose Thermite for its minimal abstraction over React, strong emphasis on composition via optics, and seamless integration with PureScript's type system, making it ideal for building maintainable UIs in a functional style.

Overview

A simple PureScript wrapper for React

Use Cases

Best For

  • Building interactive UIs in PureScript with a functional programming approach
  • Creating composable React components using lenses and prisms for state and action management
  • Implementing asynchronous action handlers with coroutines for state updates
  • Developing modular component systems where subcomponents can be combined monoidally
  • Embedding collections of subcomponents with indexed state and actions via `foreach`
  • Handling optional child components with `Maybe` states using the `split` combinator

Not Ideal For

  • Projects requiring direct access to React's full API, including hooks and lifecycle methods not covered by Thermite's abstraction
  • Teams unfamiliar with functional programming concepts like lenses, prisms, and coroutines, as Thermite relies heavily on these
  • Applications that depend extensively on JavaScript libraries without PureScript bindings, due to Thermite's PureScript-specific nature
  • Rapid prototyping where a more opinionated UI framework with pre-built components would speed up initial development

Pros & Cons

Pros

Declarative Component Model

Enforces clear separation of concerns with actions, states, and pure rendering functions, as shown in the counter example where rendering and action handling are defined separately.

Composition via Optics

Uses lenses and prisms like focus, split, and foreach to flexibly embed and combine components, enabling modular design as demonstrated in the combining components section.

Asynchronous Action Handling

Supports complex workflows with coroutines that can emit multiple state updates, ideal for AJAX calls or websockets, illustrated in the performAction example with server-side increments.

Monoidal Spec Composition

Allows Spec types to be combined using Semigroup and Monoid instances for easy modular assembly, reducing boilerplate in component design.

Cons

Limited React API Coverage

Does not expose all React features, requiring fallback to purescript-react for specialized use cases, which adds complexity and potential integration hurdles.

Steep Learning Curve

Requires understanding of advanced functional programming concepts like optics and coroutines, which can be a barrier for developers new to PureScript or FP.

Ecosystem Constraints

Tied to the PureScript ecosystem, which has a smaller community and fewer libraries compared to JavaScript, limiting third-party integration options and support resources.

Frequently Asked Questions

Quick Stats

Stars348
Forks52
Contributors0
Open Issues5
Last commit3 years ago
CreatedSince 2014

Tags

#react-wrapper#functional-ui#purescript#frontend#declarative-ui#state-management

Built With

R
React
P
PureScript

Included in

PureScript482
Auto-fetched 4 hours ago

Related Projects

purescript-halogenpurescript-halogen

A declarative, type-safe UI library for PureScript.

Stars1,586
Forks218
Last commit1 year ago
purescript-puxpurescript-pux

Build type-safe web apps with PureScript.

Stars567
Forks75
Last commit3 years ago
purescript-reactpurescript-react

React Bindings for PureScript

Stars409
Forks65
Last commit3 years ago
FlameFlame

Fast & simple framework for building web applications

Stars319
Forks10
Last commit1 month ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub