Skip to content

v3.0.0

Choose a tag to compare

@vydimitrov vydimitrov released this 12 Jan 07:38
· 27 commits to master since this release

In v3 both packages - web and mobile are rewritten in TypeScript and bunch of improvements are added:

Improvements

  • The Web and Mobile packages are now written in TypeScript
  • PNPM is now used as package manager as well as to handle the monorepo
  • Webpack is replaced by Esbuild to bundle the code and run dev server
  • PropTypes are no longer required as peerDependencies. The component relays on the TypeScript types
  • New prop updateInterval is added to control how often the timer should be updated
  • New prop colorsTime is added to handle the times when a color should switch to the next color. This was part of the colors prop before
  • New prop isSmoothColorTransition indicates if the colors should smoothly transition to the next color or just change the color when the time comes
  • New event handler onUpdate will fire every time the time changes
  • Reduce overall bundle size and provide ES module export for the Web package

Breaking changes

  • IE is no longer supported
  • colors prop now is either: Single color in any valid color format or URL to a gradient; Array of colors in HEX format. At least 2 colors should be provided.
  • Gradient is no longer supported out of the box and isLinearGradient and gradientUniqueKey are now deprecated. The gradient can be set from outside of the component. Please refer to the recipes section.
  • ariaLabel and renderAriaTime are also deprecated. Refer to the recipes section to check how this can be implemented.
  • children prop now accepts only a render function and it does not take a React component as a children

React Native (mobile) changes

  • The Mobile package does not rely on AnimatedPath to animate the SVG path but instead it uses the animation event loop from use-elapsed-time. Thus now both packages - web and mobile share the same core logic to animate the path. Performance comparison shows that the later approach is much more performant.