How to reload the D3 svg element after setting the state of the dataset in REACT

Hi guys i’m playing with D3.js and React trying to create a dancing bargraph, how do i reload the D3 svg after setting the state of the dataset in REACT? here’s my code: https://codepen.io/mav1283/pen/LJwWVw?editors=0010

Already found an answer on stackoverflow :slight_smile: