Skip to content

Commit 0e95830

Browse files
committed
Update README.md
1 parent a989d66 commit 0e95830

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

README.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,43 @@ Demo: http://cheton.github.io/react-infinite-tree
1515
* A rich set of [APIs](https://github.com/cheton/infinite-tree#api-documentation)
1616

1717
## Browser Support
18-
![Chrome](https://raw.github.com/alrra/browser-logos/master/chrome/chrome_48x48.png)<br>Chrome | ![Edge](https://raw.github.com/alrra/browser-logos/master/edge/edge_48x48.png)<br>Edge | ![Firefox](https://raw.github.com/alrra/browser-logos/master/firefox/firefox_48x48.png)<br>Firefox | ![IE](https://raw.github.com/alrra/browser-logos/master/internet-explorer/internet-explorer_48x48.png)<br>IE |
19-
![Opera](https://raw.github.com/alrra/browser-logos/master/opera/opera_48x48.png)<br>Opera | ![Safari](https://raw.github.com/alrra/browser-logos/master/safari/safari_48x48.png)<br>Safari
18+
![Chrome](https://raw.github.com/alrra/browser-logos/master/chrome/chrome_48x48.png)<br>Chrome | ![Edge](https://raw.github.com/alrra/browser-logos/master/edge/edge_48x48.png)<br>Edge | ![Firefox](https://raw.github.com/alrra/browser-logos/master/firefox/firefox_48x48.png)<br>Firefox | ![IE](https://raw.github.com/alrra/browser-logos/master/internet-explorer/internet-explorer_48x48.png)<br>IE | ![Opera](https://raw.github.com/alrra/browser-logos/master/opera/opera_48x48.png)<br>Opera | ![Safari](https://raw.github.com/alrra/browser-logos/master/safari/safari_48x48.png)<br>Safari
2019
--- | --- | --- | --- | --- | --- |
2120
Yes | Yes | Yes| 9+ | Yes | Yes |
2221

23-
## Notice
24-
<i>The project is under heavy development and a lot of things are changing. Stay tuned for further updates.</i>
25-
2622
## Installation
2723
```bash
2824
npm install --save react react-dom infinite-tree
2925
npm install --save react-infinite-tree
3026
```
3127

32-
## Usage
28+
## Example
3329
```jsx
3430
import React from 'react';
3531
import InfiniteTree from 'react-infinite-tree';
3632
import 'react-infinite-tree/dist/react-infinite-tree.css';
3733

34+
const data = {
35+
id: 'fruit',
36+
label: 'Fruit',
37+
children: [{
38+
id: 'apple',
39+
label: 'Apple'
40+
}, {
41+
id: 'banana',
42+
label: 'Banana',
43+
children: [{
44+
id: 'cherry',
45+
label: 'Cherry',
46+
loadOnDemand: true
47+
}]
48+
}]
49+
};
50+
3851
class App extends React.Component {
3952
tree = null;
4053

4154
componentDidMount() {
42-
const data = generateData();
4355
this.tree.loadData(data);
4456

4557
// Select the first node
@@ -103,7 +115,7 @@ class App extends React.Component {
103115

104116
## API Documentation
105117

106-
Check out API documentation from [infinite-tree](https://github.com/cheton/infinite-tree/wiki):
118+
Check out API documentation at [infinite-tree](https://github.com/cheton/infinite-tree/wiki):
107119

108120
* [Options](https://github.com/cheton/react-infinite-tree/wiki/Options)
109121
* [Functions: Tree](https://github.com/cheton/react-infinite-tree/wiki/Functions:-Tree)

0 commit comments

Comments
 (0)