Skip to content

Instantly share code, notes, and snippets.

@kenwheeler
Created August 11, 2016 13:20
Show Gist options
  • Save kenwheeler/46621e63dc83f66ab75bb8cac5df5a50 to your computer and use it in GitHub Desktop.
Save kenwheeler/46621e63dc83f66ab75bb8cac5df5a50 to your computer and use it in GitHub Desktop.
React Europe Talk
# Cross Platform Charting With React & React Native
Ken Wheeler | ken_wheeler
***
![Pyramid Graphic](http://i.imgur.com/NPYu64W.png)
***
## State of Charting
- There are tons of charting libraries to pick from
- Which one to use is dependent upon needs
- D3 is king, lots of libs use it under the hood
***
## Charting in React with d3
- React is the manager of the DOM
- There are two different approaches
***
## Manual DOM mutation
- After a component mounts or subsequently receive props, use d3 to target a rendered element and draw a chart based upon data derived from props and state
***
## Use data to produce renderables
- Generate data using d3's math
- Use react to render that data to SVG
***
## Victory
- An ecosystem of modular data visualization components
***
[Components demo]
***
- Friendly
- Flexible
- Composable
***
[Playground demo]
***
## What about native?
***
- Swap svg renderables with react-native-svg
- Same API
***
[Device Video]
***
## AVAILABLE NOW!
***
## Thanks!
***
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment