content: import React from 'react';
  import D3Component from 'idyll-d3-component';
  import * as d3 from 'd3';
  
  const size = 600;
  
  class CustomD3Component extends D3Component {
    initialize(node, props) {
      const svg = (this.svg = d3.select(node).append('svg'));
      svg
        .attr('viewBox', `0 0 ${size} ${size}`)
        .style('width', '100%')
        .style('height', 'auto');
  
      svg
        .append('circle')
        .attr('r', 20)
        .attr('cx', Math.random() * size)
        .attr('cy', Math.random() * size);
    }
  
    update(props, oldProps) {
      this.svg
        .selectAll('circle')
        .transition()
        .duration(750)
        .attr('cx', Math.random() * size)
        .attr('cy', Math.random() * size);
    }
  }
  
  export default CustomD3Component;
  