CSS allows you to create animations with transitions and keyframes. However, CSS does not provide a way to perform a callback when an animation is complete. With JavaScript, it’s possible to detect the end of a CSS transition or animation and then trigger a function.

If we organize the type of events we would like to listen for we can create a function to capture a specific type of animation or transition to pass to a callback function.

Example

For instance, say you’d like to have a method run after a CSS transition that collapses an element by changing its max-height property. In this example, a click event will add a class to a container element that displays the transition.

Once it is complete, a callback function will be run.


The CommonJS module system only allowed for the export of a single object from a module. ES6 module syntax allows for a single default export and any number of named exports. Both can be included in the same module and consumed individually or together. Let’s illustrate this with a simple module example.

export const version = '1.2.30';export default version;

Though it appears that the same constant is being exported twice, this allows you to get the default export bound to version or get the named export bound to version using curly braces.

// default export
import version from './version';


Photo by Sharefaith from Pexels

Breonna Taylor

Ahmaud Arbery

George Floyd

Tony McDade

I am exhausted.

Several of my White friends have reached out to me in the past few days. They have expressed concern for me and my family. They see the outrage that has consumed our nation and spread throughout the globe. They care about me and they want me to know. I truly appreciate their outreach…
but I do not know how to respond.

We’ve seen this countless times before. The shock wore off a long time ago, but social media is on fire. And here we are again with the same…

Marcus T

Software dev

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store