Skip to content

Commit 6fd4f5a

Browse files
committed
Small docs updates
1 parent 90c95d3 commit 6fd4f5a

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,26 @@ Install `react-virtualized` using npm.
1919
npm 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+
2242
Documentation
2343
---------------
2444

docs/ScrollSync.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ This example uses `ScrollSync` to create a fixed row of columns to go along with
2828

2929
```js
3030
import { Grid, ScrollSync, VirtualScroll } from 'react-virtualized'
31+
import 'react-virtualized/styles.css'; // only needs to be imported once
3132

3233
function render (props) {
3334
return (

0 commit comments

Comments
 (0)