Stacking filters on a state and reverting back to initial state

I am building a page mimicking a marketplace where you buy stuff online. Issue I am facing is how can I stack filters on the displayed results which I have saved in a state.
for example price range filter is applied then product type is applied on top of that then size etc and each filter reduces the number of displayed results but then when the user undo one of the filters then I need to update the already filtered results accordingly, if he undo all of filters then I am basically going back to the initial results.

My idea is to create another state (tempFiltredState) which basically takes the initial state and apply whatever filter was used on it then I can render this tempFiltredState when it is true, however I can’t find the logic to get this done. my idea is to have one big filters wrapper function that gets triggered when any filter is clicked.

import React, { useContext, useState } from 'react'
const[pricefilter,SetPriceFilter]=useState(false)
const[menonlyfilter,SetMenOnlyFilter]=useState(false)
const[shoesonlyfilter,SetShoesOnlyFilter]=useState(false)
const[tempfiltredstate,SettempFiltredState]=useState([])
const[allresults,SetAllResults]=useState(project.apiResults)

// filters job will be to pass values of filters and set filter state to true
const handleClickedFilters=(allresults)=>{

    
    const res = pricefilter?updatePrice(sliderrange[0], sliderrange[1], allresults):allresults
     const res2= menonlyfilter? showMenOnly(res, vcCodes):res
     const res3=shoesonlyfilter?showShoesOnly(res2, shoescodes): res2

     settempFiltredState(res3) 
    //  Issue here I can't return a function from a ternary operator, any other way to write it? or even a better solution to handle this problem 
    
}
// missing how can you set filter state back to false when not in use?
Note: each of the functions I run above on the results is just array.filter function which mutate the array