The useDimensions Hook


Discover how to create a custom hook that listens for changes in dimensions, a key component for responsive charts.

Members only
4 minutes read

The visualization component is going to be wrapped in a responsive div. We need a way to retrieve this container's dimensions.

To achieve this, let's create a hook called useDimensions.

Oh no! ๐Ÿ˜ฑ

This lesson isnโ€™t available just yet.

Take a look at the status badges next to each lesson in the sidebar to see when itโ€™s coming out.

Thanks for your patience! ๐Ÿ™