Skip to content

Commit

Permalink
docs: fix immutable demo embedding (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
kvet authored Jul 7, 2017
1 parent 9cd5efa commit 5eb9809
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions packages/dx-react-grid/docs/guides/immutability.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,23 @@ DevExpress Data Grid for React conforms to the React [optimization principles](h
You can use the [seamless-immutable](https://github.com/rtfeldman/seamless-immutable) library to make a React Grid state immutable.
The following example demonstrates how to initialize an immutable state:

this.state = {
data: Immutable({
// the state fields
})
};
```js
this.state = {
data: Immutable({
// the state fields
})
};
```

Then you can use the state in a usual way because `seamless-immutable` keeps backwards-compatibility with normal Arrays and Objects.

The following demo demonstrates the React Grid with `seamless-immutable` in action:

[DEMO](http://devexpress.github.io/devextreme-reactive/react/grid/demos/#/immutability/seamless-immutable)
Bootstrap 3:
[Demo](http://devexpress.github.io/devextreme-reactive/react/grid/demos/#/bootstrap3/immutability/seamless-immutable) |
[Source](https://github.com/DevExpress/devextreme-reactive/tree/master/packages/dx-react-demos/src/bootstrap3/immutability/seamless-immutable.jsx)

Material UI:
[Demo](http://devexpress.github.io/devextreme-reactive/react/grid/demos/#/material-ui/immutability/seamless-immutable) |
[Source](https://github.com/DevExpress/devextreme-reactive/tree/master/packages/dx-react-demos/src/material-ui/immutability/seamless-immutable.jsx)

[SOURCE](https://github.com/DevExpress/devextreme-reactive/tree/master/packages/dx-react-demos/src/bootstrap3/immutability/seamless-immutable.jsx)

0 comments on commit 5eb9809

Please sign in to comment.