Closed Marcisbee closed 6 years ago
Subscribes to any EventTarget, transforms data and injects into store.
EventTarget
const mouseEvent = new Subscribe(document).on('mousemove', ({x, y}) => ({x, y})) const tracker = new Store({ mouse: mouseEvent({x: 0, y: 0}), })
Example usage
Subscribes to any
EventTarget
, transforms data and injects into store.