Internal synchronization for the Graffiti API
npm install @graffiti-garden/wrapper-synchronizeThis library wraps the Graffiti API
so that changes made or received in one part of an application
are automatically routed to other parts of the application.
This is an important tool for building responsive
and consistent user interfaces, and is built upon to make
the Graffiti Vue Plugin
and possibly other front-end libraries in the future.
In node.js, simply install the package with npm:
``bash`
npm install @graffiti-garden/wrapper-synchronize
In the browser, you can use a CDN like jsDelivr. Add an import map the the
of your HTML file:
`html
`In either case, you can then import and contruct the class as follows:
`typescript
import { GraffitiSynchronize } from "@graffiti-garden/wrapper-syncronize";
const graffiti = new GraffitiLocal() // or any other implementation of the Graffiti API
const graffitiSynchronized = new GraffitiSynchronize(graffiti)
``