What am I doing wrong here? https://snack.expo.dev/@kickbk/names
Click on F to sort by first_name or L to sort by last_name.
You will see that:
- When you load it, it should be filtered by
first_name. It is not showing it sorted. - when you click on L to sort by
last_name, it displays the data sorted byfirst_name - Then when you click on F to sort by
first_name, it displays the data sorted bylast_nameIn fact, it sorts the data correctly, but only renders it the next time you sort it. Why? I made it very easy to follow on the issue I'm getting. Just check the logs and see what it prints.