In my useState, I have an array of objects
const [tasks,setTasks] = useState([{completed: true},{completed: false}])
I decided to sort the tasks so that completed ones are at the bottom.
<div>
{tasks.map((elem) => (
<div
onClick={
//I want to change completed to true if it's currently false. Any ideas on how to create a CSS animation that makes it look like the task is falling down?
}
>
{elem.name}
</div>
))}
</div>;
I attempted using shuffle and ReactCSSTransition, but they are outdated and not effective. Are there any other libraries I can use for this purpose?