File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,6 +19,26 @@ Install `react-virtualized` using npm.
1919npm install react-virtualized --save
2020```
2121
22+ ES6, CommonJS, and UMD builds are available with each distribution.
23+ For example:
24+
25+ ``` js
26+ // Make sure to import default styles.
27+ // This only needs to be done once; probably during your application's bootstrapping process.
28+ import ' react-virtualized/styles.css' ;
29+
30+ // Then you can import any react-virtualized components you need.
31+ // Tree-shaking is supported with ES6 or CommonJS usage.
32+ import { Grid } from ' react-virtualized'
33+ ```
34+
35+ Alternately you can load a global-friendly UMD build:
36+
37+ ``` html
38+ <link rel =" stylesheet" href =" path-to-react-virtualized/styles.css" >
39+ <script src =" path-to-react-virtualized/dist/umd/react-virtualized.js" ></script >
40+ ```
41+
2242Documentation
2343---------------
2444
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ This example uses `ScrollSync` to create a fixed row of columns to go along with
2828
2929``` js
3030import { Grid , ScrollSync , VirtualScroll } from ' react-virtualized'
31+ import ' react-virtualized/styles.css' ; // only needs to be imported once
3132
3233function render (props ) {
3334 return (
You can’t perform that action at this time.
0 commit comments