@qpqjs/web
v0.10.0
Published
Browser-side helpers for talking to a quidproquo backend.
Readme
@qpqjs/web
Browser-side building blocks for quidproquo, with no UI framework attached.
If you are writing a React app, install @qpqjs/web-react instead. It depends on this package and adds the hooks, state store, and providers.
npm install @qpqjs/webWhat is in here
- Web actions: reading and writing query parameters, and window access, expressed as qpq actions so a story can use them
WebsocketService: a managed websocket connection with reconnect handling- Federation helpers: forcing a federated remote to reload, which is what makes a deploy visible to an already-open tab
- Small utilities shared across qpq frontends, such as
timeAgoanduniqueBy
Why the actions
Query parameters and window state are side effects like any other. Going through an action keeps the story that uses them testable and lets the same logic run server-side, where a processor answers with something else.
Status
Pre-1.0. The whole @qpqjs/* family releases in lockstep, so versions that share a number were built and tested together. Expect APIs to move between releases, and pin your versions.
Documentation
License
MIT. See LICENSE.
