Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

Releases: developertown/react-lottie-hook

Package Upgrades

10 May 12:20
a57f32d
Compare
Choose a tag to compare

This new release include:

  • upgrades all dependencies to their latest
  • regenerated TS example
  • renamed JS example

0.2.0

26 Oct 00:49
8b5786d
Compare
Choose a tag to compare

Version 0.2.0 - separation of state and controls.

Upgrades all dependencies.
Moves example into an examples folder and added an extra repo demo.

react-lottie-hook no longer has react and react-dom as dependencies.
Previous yarn resolutions no longer necessary and remvoed.

New controls were added:

  • setSpeed
  • resize
  • goToAndPlay
  • goToAndStop
  • setSubframe
  • getDuration

Internal state is validated to exists on the exposed state in order to make sure that only existing properties are exposed.

0.1.1

08 Oct 12:43
8b5786d
Compare
Choose a tag to compare

Releasing V0.1.1.

This minor change adds setDirection control and playDirection state to useLottie return values.

0.1.0

24 Sep 00:18
8b5786d
Compare
Choose a tag to compare

Releasing v0.1.0 with workspaces.

Workspaces were added to allow development of the library in conjunction with a demo project under the example directory. The actual library now exists inside of the react-lottie-hook directory.

There are many improvements coming with this release.

  • Better usaged of react hooks
  • Additional typings

This release also fixes an issue with the eventListeners configuration option passed to useLottie and the eventListeners type has been converted from an array to an object; which mean that instead of passing an array of objects with properties eventName and callback you will need to pass object keys that correspond to lottie defined eventNames and the callbacks as their values.

const [lottieRef, state, controls] = useLottie({
  // other configurations
  eventListeners: {
    loopComplete: (data) => console.log('loop completed!),
    destroy: (data) => console.log('animation destroyed!'),
  },
});

Also, useLotties state returns an additional isLoaded boolean indicator along the pre-existing isPaused and isStopped indicators.