Build type-safe
IPC eventsIPC eventsin Electron

Reactive Event Logo
  • Maximum Type-safety (incl. error handling)
  • Makes your code more composable, reusable and testable
  • Extensive library with a rich ecosystem of packages
  • Clustering and Workflows (Alpha)

Type-safety at Every Step

Define your events as types, and wield the benefits at every step.

Without Reactive Event

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
async function getTodo(
id: number
): Promise<
| { ok: true; todo: any }
| { ok: false; error: "InvalidJson" | "RequestFailed" }
> {
try {
const response = await fetch(`/todos/${id}`)
if (!response.ok) throw new Error("Not OK!")
try {
const todo = await response.json()
return { ok: true, todo }
} catch (jsonError) {
return { ok: false, error: "InvalidJson" }
}
} catch (error) {
return { ok: false, error: "RequestFailed" }
}
}

With Effect   Reactive Event

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
const getTodo = (
id: number
): Effect.Effect<unknown, HttpClientError> =>
httpClient.get(`/todos/${id}`).pipe(
Effect.andThen((response) => response.json)
)

The missing standard library for TypeScript

TypeScript/JavaScript, the most popular programming language, is still missing a standard library. Effect is filling this gap by providing a solid foundation of data structures, utilities, and abstractions to make building applications easier.

See 2022 State of JavaScript survey

Most desired JS features

2022 State of JavaScript survey
  • 2. Standard LibraryDocs
  • 4. Immutable Data StructuresDocs
  • 5. ObservableDocs
  • 6. Pipe OperatorDocs
  • 8. Pattern MatchingDocs

Powerful building blocks

Every part of the Effect ecosystem is designed to be composable. The Effect primitives can be combined in many different ways to tackle the most complex problems.

  • Immutable data structures
  • Asynchronous queues & pub-sub
  • Configuration & dependency management
Read documentation

No more one-off dependencies

With Effect the batteries are included. Regardless of the application, your package.json will have never been this small.

  • Data validation & serialization
  • Frameworks for CLI & HTTP applications
  • Powerful abstractions for every platform
Read documentation

Never try & catch again

Effect doesn't shy away from errors — it embraces them as a fact of life. Successfully handle failure with the built-in error-handling primitives.

  • Type-safe errors as values
  • Powerful retry & recovery APIs
  • Tools for logging & tracing
Read documentation

Let's see some example code

Doing the right thing in TypeScript is hard. Effect makes it easy!
We have collated some examples to show you how Effect can be utilized in your next project.

  • Effect helps you with handling errors, async code, concurrency, streams and much more.
  • Effect provides a unified replacement for many one-off dependencies.
  • Effect integrates deeply with your current tech stack.

Effect helps you with handling errors, async code, concurrency, streams and much more.


Effect gives you new Superpowers

Composable & Reusable

Everything in the Effect ecosystem is designed to work together. Building applications with Effect feels like playing with Lego.

Maximum Type-Safety

Effect leverages the full power of TypeScript to give you confidence in your code. From errors to managing dependencies — if it compiles, it works.

Built-In Tracing

The built-in support for tracing is first-class. Effect integrates seamlessly with OpenTelemetry to give you full visibility over your application's performance.

Built-In Metrics

Effect has built-in support for metrics. You can use the provided OpenTelemetry exporter to integrate with a wide range of dashboards.

Easy to refactor

Make changes to your app with confidence. Effect's powerful abstractions make it easy to refactor your code without breaking anything.


Frequently asked questions

Can I incrementally adopt Effect?

Yes! Adopting Effect you can start by refactoring small portions of your app, usually the ones with higher complexity, and keep going as you see fit

Does Effect scale?

Effect was built for production since the very beginning, we take good care of making everything as performant as possible, by providing you with better ways to deal with concurrency and great observability finding bottlenecks in your program becomes easy

Do I have to know functional programming?

No! While Effect makes usage of Functional Programming principles and patterns internally you can be proficient in Effect by simply using it as a smart Promise and forget that there is even a thing called Functional Programming

The library is huge, do I have to know it all?

No! Every module in Effect is made with a specific problem in mind that is deemed to be common enough but you don't need to know everything, in fact you can harness 80% of the productivity gain by just learning a few functions and 2-3 core modules.

The library is huge, do I have to know it all?

No! Every module in Effect is made with a specific problem in mind that is deemed to be common enough but you don't need to know everything, in fact you can harness 80% of the productivity gain by just learning a few functions and 2-3 core modules.

What's the minimum bundle size?

The core of Effect is a runtime system that weights about 15k when compressed and tree-shaken, the rest scales with usage. If you end up using 100k of Effect code there is a good chance your app would have been 1Mb if not using Effect


Build type-safe
IPC events
in Electron

Reactive Event makes it easy to always know what data is being sent where. Check out our friendly documentation to get started.