Skip to content

Tag: react-hooks

React Hooks TypeError: todos is undefined

I am using PERN Stack with bootstrap for styling. So, I want to access my JSON data and show it in the form of todo lists. When I tried using map function I got TypeError: Here is the code: Answer I misspelled my variable. So, the problem was I was writing jsonData.data.todos instead off jsonData.data.toDos .

Plot histogram in ReactJS

Suppose I want to plot histogram for time taken to read each book. I calculated time to read each book and stored in an array as As I gone through different methods on how to plot histogram …. I found that to display data , it should be in range as: But on basis of my previous data how can