@marko-tags/effect

0.1.3 • Public • Published


@marko-tags/effect
API Stability NPM Version Downloads

Add and remove event subscriptions within your template.

Installation

npm install @marko-tags/effect

Example

<effect(() => {
  if (!state.map) {
    state.map = new google.maps.Map(component.getEl('map'));
  }
  return () => {
    state.map = null;
  }
})/>

<div key="map"></div>

API

<effect
  argument ():cleanup
  />

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @marko-tags/effect

      Weekly Downloads

      1

      Version

      0.1.3

      License

      MIT

      Unpacked Size

      8.24 kB

      Total Files

      9

      Last publish

      Collaborators

      • dylanpiercey
      • mlrawlings
      • agliga