🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@tmonier/effract

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tmonier/effract

React components written as Effect programs. yield* services and React hooks in one render pass; run the same component anywhere.

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
5
-84.37%
Maintainers
1
Weekly downloads
 
Created
Source

@tmonier/effract

Write React components as Effect programs. The same component runs in a SPA, on a Bun/Node server, in a Web Worker, or as a React Server Component.

import { Runtime, component, hook } from '@tmonier/effract';
import { useState } from 'react';

const Dashboard = component(function* () {
  const stats = yield* Stats; // an Effect service
  const [tab, setTab] = yield* hook(useState('overview')); // a real React hook
  return <Panel tab={tab} total={stats.total} onTab={setTab} />;
});

export const App = () => (
  <Runtime layer={AppLive}>
    <Dashboard />
  </Runtime>
);
  • component / view — hook-capable and resolve-up-front components.
  • hook — lift a React hook into the yield* channel.
  • <Runtime layer={...}> — provide an Effect runtime to a subtree.
  • atom, observe, <Observe>, useAtom — the signals bridge.

See the project README and ADR 0001.

MIT © Tmonier

Keywords

effect

FAQs

Package last updated on 24 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts