Skip to content

Releases: lukevella/react-activity

2.1.0

09 Jul 10:51
Compare
Choose a tag to compare

To migrate from previous versions, please import css for each individual activity indicator used.

Example

import Dots  from "react-activity/dist/Dots"
+ import "react-activity/dist/Dots.css"

This change is necessary to support apps using server-side rendering since it is not possible to inject styles into the DOM in this environment.

2.0.1

13 May 10:04
Compare
Choose a tag to compare
  • Updated docs on npm
  • Updated prop type definitions for some activity indicators to reject children prop

2.0.0

10 May 22:15
715b0f2
Compare
Choose a tag to compare
  • The library has been rebuilt with TypeScript.
  • Styles are now injected into the DOM automatically so there's no need to import .css files.

Migrating from v1

if you're not concerned about optimizing your build and are fine with including all the activity indicators in to your bundle then all you need to do is remove the import for react-activity.css

-import 'react-activity/dist/react-activity.css';

If you are importing activity indicators individually then you will need to update your import to get the component from the dist folder rather than lib and you can remove the line importing the css file since the styles are now injected automatically.

-import Dots from "react-activity/lib/Dots"
-import "react-activity/lib/Dots.css"
+import Dots from "react-activity/dist/Dots"