@effect/platform-browser package provides browser-specific implementations for the abstractions defined in @effect/platform, enabling you to build Effect applications that run in web browsers.
Installation
Available Modules
HTTP
BrowserHttpClient
Make HTTP requests using the Fetch API:Storage
BrowserKeyValueStore
Access browser storage (localStorage/sessionStorage) with Effect:WebSockets
BrowserSocket
Create WebSocket connections:Workers
BrowserWorker
Use Web Workers with Effect:Browser APIs
Clipboard
Access the Clipboard API:Geolocation
Access geolocation data:Permissions
Query and request browser permissions:Streams
BrowserStream
Work with browser streams (ReadableStream, WritableStream):Complete Runtime
BrowserRuntime
TheBrowserRuntime provides all browser services in a single layer:
Usage in React/Vue/etc.
You can integrate Effect browser services with frontend frameworks:Requirements
- Modern browser with ES2020+ support
- Effect 4.0.0 or higher