Skip to content

Latest commit

 

History

History
39 lines (24 loc) · 2.21 KB

README.md

File metadata and controls

39 lines (24 loc) · 2.21 KB

solid-effect logo

solid-effect

NPM Version Documentation License

solid-effect is a utility library for working with effect-ts in solid-js.

With Effect, you can compose your program as "effects", small programs that include the return type, error types, and requirements as part of their type signature, which establish an API contract, making defensive programming unnecessary.

Effect comes out of the box with utilities for error handling, caching, retry, interruption, concurrency, and observability, among others.

What solid-effect does is allow you to use these utilities closer to the edge of your SolidJS app.

Documentation

Read the docs to see all the features + examples!

Any examples of use-cases for using Effect with SolidJS?

So far, I've been using Effect in my SolidJS app for my GraphQL client (service layers allow for defining configuration and better error handling) and for i18n/l10n (e.g. caching formatters based on locale).

With solid-effect, I was able to pull out some of the utilities I created for displaying results (MapOption and MatchTag) and put them into their own library and improve them, while adding more utilities that I had yet to explore.

Roadmap

Once I integrate this package into my own app and use it a bit more, I think I'll have a better idea of where to go. That said, I think the next direction will be observability (logging, metrics, and tracing).

For example, it could mean having ErrorBoundarys that log errors into Effect, metrics that can be retrieved as signals, and tha ability to express spans as JSX.

I would love to hear feedback! (@jonahplusplus on Discord and @jonahplusplus.bsky.social on Bluesky!)