@metreeca/tile-data
v0.6.1
Published
Preact contexts and hooks for @metreeca/tile interfaces.
Maintainers
Readme
@metreeca/tile-data
Preact contexts and hooks for @metreeca/tile interfaces.
A consumer reaches what the app states about itself, the ambient services a subtree inherits, the accessors a component reads them back with, the adoption of a headless state object as the state of a component, and values kept in browser storage across reloads and pages. Nothing here renders, so what a component shows stays a separate decision from what it is wired to.
The shared fetch client an app publishes once is a plain fetch function, so a deployment hands over one of its own:
@metreeca/http provides composable middlewares covering authentication, caching and
uniform failure reporting, keeping those concerns with the transport layer rather than restating them in the interface.
Installation
npm install preact # peer dependency
npm install @metreeca/tile-data # this package[!WARNING]
TypeScript consumers must use
"moduleResolution": "nodenext"/"node16"/"bundler"intsconfig.json. The legacy"node"resolver is not supported.
[!WARNING]
Importing what the app states about itself reads the document, so it belongs to a browser: a consumer without one, a test or a server render, has to supply a DOM before the import runs.
Usage
[!NOTE]
This section introduces essential concepts; for complete coverage, see the API reference.
{TBD: usage overview and examples}
Support
- open an issue to report a problem or to suggest a new feature
- start a discussion to ask a how-to question or to share an idea
License
This project is licensed under the Apache 2.0 License – see LICENSE file for details.
