draw = () => {
  // get values from filter checkboxes (true / false)
  const hideDOM = document.querySelector('#dom-btn').checked;
  const hideRedux = document.querySelector('#redux-btn').checked;
  const hideRouter = document.querySelector('#router-btn').checked;

  // process data through filters
  let processedData = curData;
  if (hideRedux) processedData = filterRedux(processedData);
  if (hideDOM) processedData = filterDOM(processedData);
  if (hideRouter) processedData = filterRouter(processedData);

  // run draw function to render / update tree
  drawChart.drawChart(processedData.data[0]);

  const { store } = curData;
  // if no redux store, remove 'Store' from side panel, otherwise render store JSON
  if (!store) {
    const storeContainer = document.getElementById('store-container');
    storeContainer.innerHTML = '';
  } else {
    previousStore = drawStore(store, previousStore);
  }
  drawBreadcrumbs(processedData.data[0]);
}
Abstracting the drawing function to one command.
-This func conditionally renders based on the filter buttons
-