Thinking metrics on React apps

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →

Thinking metrics on React apps

Jean Carlo Emer

October 27, 2016

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

22 slides
  1. @PureRender class PageView extends Component { static propTypes = {

    location: PropTypes.object.isRequired } componentDidMount() { const { action, state } = this.props.location trackPageView(action, state) } componentDidUpdate() { /* */ } }
  2. <Playlist /> <Recommendation /> <Video 
 metrics="playlist" /> is a

    list of <Video 
 metrics="recommendation" /> is a list of
  3. class Video extends Component { static contextTypes = { linkMetrics:

    PropTypes.object } render() { const state = { metrics: this.context.linkMetrics } return <Link state={state}>/* ... */</Link> } }

More Decks by Jean Carlo Emer

Other Decks in Technology