Relative Content

Tag Archive for reactjsreact-routerfrontend

react js filter() method and data

I have a state called allDatas in react js, where there are data such as photos and text in the form of objects, and I get the page ID from the params, and now, using the filter() method, I asked that the object whose ID matches the ID params is equal to get its data and save it in another state, but it does not give me the data and gives me an empty array, where is the problem? thank you