async-dom
v1.0.1
Published
Asynchronously call a method after the DOM has changed.
Downloads
1
Readme
async-dom
Asynchronously call a method after the DOM has changed. It is useful when animating with css classes.
Installation
npm install async-dom
Usage
import async, { cancel } from 'async-dom';
const element = document.querySelector('.my-node');
element.classList.add('will-show');
async(() => {
element.classList.remove('will-show');
element.classList.add('did-show');
});