@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
  />

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.3
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.3
    1
  • 0.1.2
    0
  • 0.1.1
    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