How to display different list of items when clicking on a category?

Posted by Andre Scott | Updated on

Want to display different list of items when clicking on a category? I believe I have a working version for you. I changed some syntax and variable/prop names for clarity and added comments explaining changes.

The two key parts for filtering here are the .filter() and .some() methods on arrays.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers