TIDE
• Memulai
Getting Started
Install @uikode/tide and render real-time data in three steps.
Getting Started
Install @uikode/tide and render real-time data in three steps.
Install
Tide has a single peer dependency: solid-js. Total footprint is 2.8KB gzipped (core + skeleton).
1. Wrap your app
Wrap your root with TideProvider. WebSocket is optional — omit ws for HTTP-only stale-while-revalidate.
2. Fetch data in a component
createTide takes an options object. Use the url shorthand (recommended) or provide a custom fetcher. Add ws or wsPath for real-time pushes.
3. Render reactively
data is a SolidJS accessor — call it in JSX. On revisit it renders instantly from sessionStorage (0ms), then refreshes in the background.
That's it. WebSocket transport, caching, reconnection, and skeletons are all handled.