Updating Dash-Component-Boilerplate for d3.js v4+

I’m trying to create my own component using the dash component boilerplate (GitHub - plotly/dash-component-boilerplate: Get started creating your own Dash components here.) and using the sunburt demo (GitHub - plotly/dash-sunburst: Dash / React + D3 tutorial: Sunburst diagrams) as a guide. However I want to use a more current version of d3.js, but when I try to use even v4, I get warning like this that don’t appear when i use 3.5.12.

WARNING in ./src/lib/d3/bubblechart.js 23:15-17
"export 'default' (imported as 'd3') was not found in 'd3'
 @ ./src/lib/components/DashBubbleChart.react.js
 @ ./src/lib/index.js

How do I modify the react code to work with d4.js v4 and above?

Of course I answer my own question within an hour of posting (I swear, I’ve been searching for this answer for a couple of days now).

In the component javascript file, you have to import d3 like this:

import * as d3 from 'd3'