# react-tree-es6

> The wrapper of jsTree (jstree.com) for React

Latest version **1.1.0** (published 2016-08-19) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install react-tree-es6
pnpm add react-tree-es6
yarn add react-tree-es6
bun add react-tree-es6
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2016-08-19 |
| First published | 2016-08-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Khanh Hoang |
| Maintainers | hckhanh |
| Keywords | react, js, tree, es6, react-tree, react-tree-es6, tree-view |

## Links

- npm: https://www.npmjs.com/package/react-tree-es6
- Repository: https://github.com/hckhanh/react-tree-es6
- Homepage: https://github.com/hckhanh/react-tree-es6#readme
- Issues: https://github.com/hckhanh/react-tree-es6/issues
- npm.io page: https://npm.io/package/react-tree-es6

## Dependencies (4)

- [react](https://npm.io/package/react.md) ^15.3.0
- [jstree](https://npm.io/package/jstree.md) ^3.3.1
- [react-dom](https://npm.io/package/react-dom.md) ^15.3.0
- [gitbook-cli](https://npm.io/package/gitbook-cli.md) ^2.3.0

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.1.0 (latest) — 2016-08-19
- 1.0.0 — 2016-08-16
- 1.0.0-0 — 2016-08-15
- 0.1.2 — 2016-08-14

## README

# react-tree-es6

[![Build Status](https://travis-ci.org/hckhanh/react-tree-es6.svg?branch=master)](https://travis-ci.org/hckhanh/react-tree-es6)
[![codecov](https://codecov.io/gh/hckhanh/react-tree-es6/branch/master/graph/badge.svg)](https://codecov.io/gh/hckhanh/react-tree-es6)
[![dependencies Status](https://david-dm.org/hckhanh/react-tree-es6/status.svg)](https://david-dm.org/hckhanh/react-tree-es6)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/288/badge)](https://bestpractices.coreinfrastructure.org/projects/288)

If you want to find a **tree view** component for [React](https://facebook.github.io/react/), this module is what you need.

## Getting Started

**It ONLY supports ES6 and above.** Read <https://hckhanh.github.io/react-tree-es6> for more details.

## Installation

```bash
npm install --save react-tree-es6
```

## Usage

```js
const CORE = {
  data: [
    'Simple root node',
    {
      text: 'Root node 2',
      state: {
        opened: true,
        selected: true
      },
      children: [
        {
          text: 'Child 1'
        },
        'Child 2'
      ]
    }
  ]
};

class ExampleApp extends React.Component {
  constructor(props) {
    super(props);

    this.state = { items: [] };

    this.handleOnChanged = this.handleOnChanged.bind(this);
  }

  handleOnChanged(changedItems) {
    this.setState({
      items: changedItems.map(item => item.text).join(', ')
    });
  }

  render() {
    return (
      <div>
        <ReactTree core={CORE} onChanged={this.handleOnChanged} />
        <div>Selected items: {this.state.items}</div>
      </div>
    );
  }
}
```

## License

MIT

---
_Source: https://npm.io/package/react-tree-es6 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
