Relative Content

Tag Archive for reactjs

On submit delete data is also showing

‘m building a simple to-do app in React where I can add and delete items. However, after I delete an item, the deleted item reappears when I submit a new one. I’ve checked the state in the console, and it shows the correct data, but the UI still displays the deleted item.

Given array of objects sort by one of the object fields

Given that we an array of articles where each article has a title , description and date . so we have a list of articles that are displayed . Now we have two buttons sort by title and sort by date which should sort the articles when the corresponding button is clicked.