API Reference
getActiveConflicts()
Returns every currently unresolved handshake conflict, across every store, as one flat array — the read side of the universal conflict register that drives a single developer-controlled resolution UI.
Prerequisites
- At least one store registered with queueConfig.replayStrategy: 'handshake' — see api/register
- core-concepts/conflict-resolution for the full handshake and register model
1
Basic usage
flux.getActiveConflicts() returns a snapshot array — every conflict currently frozen in the register, from every store, at the instant you call it.typescript
2
UnifiedConflictFrame shape
Each entry carries everything a resolution UI needs to show the user both sides of the disagreement — what they changed offline, and what actually landed on the server in the meantime.
typescript
3
A one-off pull, not a live view
getActiveConflicts() doesn't update on its own — call it again to get a fresh read, or use subscribeToConflicts() if you want to be notified as the list changes.typescript
4
When the list changes
The register only ever grows or shrinks in response to a handshake reconnect probe or an explicit resolution — never from a
fire_and_forget store, which has no server record to conflict against in the first place.typescript
Logout clears user-scoped conflicts too
clearUserSession() removes any frame belonging to a 'user'-scoped store and re-fires the update — a conflict panel driven by this array clears itself automatically on logout without extra wiring. See core-concepts/multi-tenant-scoping.
5
useFlux().activeConflicts
In flux-next / flux-react,
useFlux() exposes this same array as activeConflicts, kept live internally so you don't need to wire your own subscription for a typical component.typescript
6
Resolving what you're shown
This API only reads the register — resolving a conflict is a separate call. A typical panel renders each frame and lets the user choose which side wins.
typescript
For actually resolving a conflict, see api/resolve-unified-conflict. For the full two-pass handshake model that produces these frames, see core-concepts/conflict-resolution.