@apertura/react
React bindings for the Apertura viewer
8 exported symbols · 2 declared here · 6 re-exported
Classes
A framework-independent document viewer. The single place that knows the full path from bytes to format to document to DOM. The React, Vue and Angular wrappers are thin adapters over this class, so their behaviour is identical by construction rather than by convention.
Functions
A registry with every supported format registered. The convenient entry point for an application that just needs to open a file. When bundle size matters, build a {@link FormatRegistry} by hand so only the parsers actually used are included.
Creates a viewer mounted into the given element.
Binds a {@link Viewer} to a React component's lifecycle. State is read through `useSyncExternalStore`: the viewer is the external source of truth, and subscribing to it directly avoids duplicating state in `useState` and avoids tearing under concurrent rendering.
Interfaces
Type aliases
Viewer state; UI wrappers render indicators from it.