sgr
Explore posts from serversIntegrating IndexedDB with Solid.js for Real-time Updates
Hello, I'm working on integrating IndexedDB with a Solid.js application. My objective is to display data from IndexedDB and ensure that any changes in the database are reflected in real-time within the app without manual refreshes.
Here's a brief overview of my current approach:
I've set up IndexedDB to store and retrieve data.
I'm using Solid's createSignal to manage the state in the app.
Whenever there's an update in IndexedDB, I manually fetch the updated data and update the Solid signal.
While this method is functional, I'm curious if there's a more efficient or idiomatic way to achieve real-time updates in Solid.js when interfacing with external data sources like IndexedDB.
Specifically:
Is there a recommended pattern or best practice for integrating IndexedDB with Solid.js?
Can I leverage Solid's reactive system to automate updates without having to fetch data manually after every IndexedDB change?
Are there any community examples or resources that detail a similar integration?
5 replies