DEV Community

loading...

Discussion on: React and D3: Dynamic COVID-19 Visualizations (Part 2: Country Comparison Dashboard)

Collapse
liaowow profile image
Annie Liao

Congrats Jesse for completing the d3 project! While still in the early stages of exploring d3, I am already overwhelmed by the number of built-in methods.

Quick question on your goal#4: What do you think of using local states vs. Redux store? I used local states before learning Redux, and I found Redux so much easier compared to the horrifying prop-drilling process I had when building a gaming app.

Collapse
jessesbyers profile image
Jesse Smith Byers Author

Thank you, Annie! Glad to hear you're jumping into d3! There are a ton of methods! Navigating those methods was definitely where I spent the most time in this project.

I decided to start the project using local state for two reasons. First, just to practice state management without Redux, and secondly, because I was envisioning a much simpler project at the beginning. Once I started getting more familiar with d3 and adding more interactive pieces, it grew and definitely came to the point that Redux would have been helpful. The map portion was simple enough for local state, but the bar chart portion grew and was ready for an upgrade to Redux. The last feature I added was the "Return to Collection" button that allows users to switch between the collection/index and country/show page, and I came very close to refactoring the whole thing to add Redux at that point! As a workaround, I had to rely on passing data through NavLinks, which is not ideal.

Collapse
nibble profile image
Joseph Mawa

I am already overwhelmed by the number of built-in methods.

Actually that statement resonates with most people. I first came across d3.js when i was following the FCC curriculum. It is a very powerful tool for data visualization in the browser but it has a very steep learning curve. I feel it will take a very long time for one to get the hang of it.

Forem Open with the Forem app