Releases: lukevella/react-activity
Releases · lukevella/react-activity
2.1.0
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
2.0.0
- 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"