Skip to content

Tag: reactjs

How to make correct loop of JSON in React

I’ve got a problem with making a correct loop in React. I want to fetch data from JSON to don’t repeat components. I tried to make two loops and then two maps, but everything was in bad order. The other problem is that “description” is also an array that’s why I’m not able …

Filter list of Objects according to the month?

I am using graphs, so whenever I choose to show data according to the months, I will have to show data for the each month, I have fields like totalAmount, paidAmount , I should sum data for that month. In that list, I have invoiceDate, one object is of april month and other is of May month. Click here what

React : Empty values on PUT for axios

I have a simple list that I get from an API using axios. Every element is a modifiable input, with it own update button. After changing the data of an input, and while performing PUT request, console.log(test); returns empty values. I checked console.log(newList); which is the array of the list, and the chang…

Put a dynamic src for an img (React/JS)

I created a function that returns a img tag with a dynamic src, Everything works but I want to make it shorter : Dirty version Cleaner attempt version But for my cleaner attempt, the image is not shown 🙁 Answer Kind of a solution; you can put the images to an object and then

how to fetch api data using react js

At what i am trying to do is when i click on checkbox 1st row in table and then click submit button then url image is not open . i want to make when i click on checkbox then click submit button then url image is open. how can we do that any idea or help its very thankful. my