✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐍Plotly, Coiled CEOs Discuss Partnering & ML Experts show us how Dash + Dask apps work Register for the Webinar.

Custom components using d3 and React Hooks

Hello there!

I am fairly new to Dash and this forum, so let me first say a big thanks for everyone putting out some great work around here!

This is more a tell than a show, but hope you don’t mind it… :blush:

I have been playing around with custom components using the boilerplate and D3… There are a few examples in the documentation using class components (which are very useful), however Hooks are getting more and more common and I decided to use them instead.

If anyone is interested, I’m currently working on a few examples in this repo:

Any suggestions and feedbacks are very welcome!

Thanks! :v:


Thanks for this! I’ve been meaning to explore using hooks in dash components, so this is very useful!

1 Like

Thanks @jlfsjunior for posting your Dash D3 components - it’s really helpful.

To see even more great examples, be sure to check out the dash-bootstrap-components library. @tcbegley refactored all the components to use functions and hooks last year. If you look at the git history, you can see the before and after and it makes it really easy to see how to make the components both ways.

This example is for the dbc.Alert component: