Skip to content
This repository was archived by the owner on Sep 7, 2020. It is now read-only.

Commit cfbd3ac

Browse files
committed
Merge pull request #30 from Olical/limitations
Limitations
2 parents 6d1ccde + 759ecd3 commit cfbd3ac

1 file changed

Lines changed: 23 additions & 3 deletions

File tree

README.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,27 @@ You can think of this as a bare bones [jsdom][] that's built to bridge the gap b
2525

2626
I'm trying to keep it light so as not to slow down your render function. I want efficient, declarative and stateless code, but I don't want to throw away previous tools to get there.
2727

28+
## Limitations
29+
30+
It's great for...
31+
32+
* Static D3 components or other such libraries (things like Backbone should work too!)
33+
* D3 components with simple state and event interaction, like tooltips on charts
34+
* D3 components such as progress bars that can be animated using [react-motion][], for example
35+
36+
It's not so great for...
37+
38+
* Physics based D3 components or anything using a lot of DOM mutation and state
39+
* Linked to the previous one, brushing and filtering of selections using the built in stateful D3 tools
40+
* Essentially: Anything with a lot of DOM mutation from timers, events or internal state will be hard to use
41+
42+
If you keep it stateless and React-ish then you'll be fine. Use tools like D3 to fluently build your charts / DOM, don't use it as an animation / physics / DOM mutation library, that doesn't work within React. See the state example linked below for a simple way to handle state, events and D3.
43+
2844
## Usage
2945

3046
* Full [documentation][] with current DOM API coverage
31-
* A full example use case can be found [in my lab][lab-post] ([source][lab-source])
47+
* [An example static chart ][lab-chart] ([source][lab-chart-source])
48+
* [A simple example using state and events][lab-state] ([source][lab-state-source])
3249
* [d3-react-sparkline][], a small component I built at [Qubit][]
3350

3451
## Development
@@ -64,8 +81,11 @@ Do what you want. Learn as much as you can. Unlicense more software.
6481
[d3]: http://d3js.org/
6582
[react]: http://facebook.github.io/react/
6683
[jsdom]: https://github.com/tmpvar/jsdom
67-
[lab-post]: http://lab.oli.me.uk/d3-to-react-again/
68-
[lab-source]: https://github.com/Olical/lab/blob/gh-pages/js/d3-to-react-again/main.js
84+
[lab-chart]: http://lab.oli.me.uk/d3-to-react-again/
85+
[lab-chart-source]: https://github.com/Olical/lab/blob/gh-pages/js/d3-to-react-again/main.js
86+
[lab-state]: http://lab.oli.me.uk/react-faux-dom-state/
87+
[lab-state-source]: https://github.com/Olical/lab/blob/gh-pages/js/react-faux-dom-state/main.js
6988
[d3-react-sparkline]: https://github.com/QubitProducts/d3-react-sparkline
7089
[qubit]: http://www.qubit.com/
7190
[documentation]: ./DOCUMENTATION.md
91+
[react-motion]: https://github.com/chenglou/react-motion

0 commit comments

Comments
 (0)