Hey Coders,
Before we start, I can’t believe we reached 500 subscribers 🤯 on this newsletter and to be honest I didn’t know these many people will be interested in these challenges.
Good news for you is that I resumed working on codstak.com and will be making a lot of changes, adding new challenges and give it overall a new look. You will definitely love it ❤️.
So lets’s start with today’s challenge. You need to do some sorting and filtering. This is a very fundamental question and you will see these types of questions in the interview a lot.
Here’s the description
Objective: Build a React component that displays a list of items with the ability to filter by category and sort by name in ascending or descending order.
Requirements: Display a list of items containing a name and category. Filtering: Allow users to filter items by category using a dropdown. Sorting: Allow users to sort items alphabetically (ascending/descending). Maintain state: Ensure that filtering and sorting updates dynamically.
Expected Features: A dropdown to filter items by category (e.g., "Fruit" or "Vegetable"). A dropdown to change the sorting order (Ascending/Descending). A dynamically updating list that reflects the selected filter and sorting order.
You can try this question here: https://www.codstak.com/all-challenges/filter-the-list
Well, that’s it for this week. Will meet next week with new challenge.