API Reference / @evolu/common / Evolu/Internal / FlushSync

Type Alias: FlushSync()

type FlushSync = (callback) => void;

Defined in: packages/common/src/Evolu/Platform.ts:13

FlushSync is for libraries like React to flush updates synchronously inside the provided callback to ensure the DOM is updated immediately.

For example, with React, when we want to focus on an element rendered as a result of a mutation, Evolu ensures all DOM changes are flushed synchronously if an onComplete callback is used.

https://react.dev/reference/react-dom/flushSync

Parameters

ParameterType
callback() => void

Returns

void

Was this page helpful?