localForage / localForage/localForage-observable
Change detection across multiple components on a page
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 88
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I am using localForage together with localforage-observable in a React application. I have multiple React components on the same page, each subscribing to changes on the same localForage key using the observable extension.
**Issue:**
When a value is updated in one component, the observable in another component does not always receive the change notification.
The only way I have found to make change detection work reliably across components is to load localForage as a global external script (from a CDN), so that all components share the same global instance.
**Questions:**
- Is this the expected behavior? Should localforage-observable work across multiple React components if each imports localForage from npm?
- Is there a recommended way to ensure change detection works across multiple components without relying on a global CDN script?
- Is there a way to force localforage-observable to use the same storage/event context across all components?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are identified. Start by reproducing the notification behavior with multiple React components importing localForage and localforage-observable from npm, then compare it with the CDN-global setup. Done means documenting whether npm imports share an event context and identifying a supported non-global setup if they do not.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100