@marko-tags/effect
v0.1.3
Published
Lifecycle events directly in your template
Downloads
2
Readme
Add and remove event subscriptions within your template.
Installation
npm install @marko-tags/effectExample
<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
/>