Javascript – How do I reset an array filter when a new "option" is selected? (React)
I have been trying to make a category filter for my webshop project that I've been working on. I'm fairly new to React/JavaScript, so I'm probably missing something very obvious. {!loading ? webshopData.categories?.map((item) => { const filtered = products.filter((obj) =>…