Composables
The composables package exports helpers for fetching FEWS data (locations, time series, WMS layers), sharing available dates, and integrating micro-frontends with a host application (webservice configuration, refresh signals, notifications, and in-flight request diagnostics).
Composables by Use Case
Most micro-frontends start with the data-loading composables. Use the host-integration composables when the remote needs host services or needs to send information back to WebOC. Advanced controls are optional for custom workflows.
Load FEWS Data
- usePiLocations — fetch and refresh locations using a FEWS PI filter.
- usePiTimeSeries — load keyed time-series requests and track their state.
- useWms — load WMS capabilities, layer times, and legend graphics.
Send Information to WebOC
- useNotifications — ask the host to display a notification or alert.
- useDateRegistry — register dates from a remote so WebOC can populate its shared DateTimeSlider. The host creates the registry with
createDateRegistry.
Use Host-Provided Context
- useHostWebserviceContext — access the host's FEWS Web Services URL and authorization headers.
- useHostRefreshContext — access the host's shared system-time refresh signal.
Advanced Controls and Diagnostics
- useRefreshCoordinator — coordinate custom refresh callbacks and policies; the data-loading composables already use it internally.
- Shared Request Inspection — inspect in-flight deduplicated requests for diagnostics or monitoring.