Effect VS Vanilla JS APIs
Loop Decoder provides two APIs for the Data Store: Effect and Vanilla JS.
Effect API
The Effect API is the most flexible and powerful one, and it utilizes the Effect TS framework. This API uses:
- Effect’s Layers for dependency injection
- Effect’s Generator functions instead of standard async/await functions
Vanilla JS API
The Vanilla JS API is a simpler alternative to the Effect API, but it still covers the main use cases related to data store. This API is ideal for:
- Projects that don’t need advanced features and want to use some of the Built-in Stores
- Simpler implementations with Promise-based async/await
- Easier integration with existing JavaScript codebases
Project Examples
Effect API:
-
Web Playground - always uses the latest version of Loop Decoder
-
Decoder API - template for building your own Decoder API server with Loop Decoder
Vanilla JS API:
- Farcaster on-chain alerts bot - template of the Farcaster bot, uses Vanilla JS API and custom in-memory stores