Reactjs – React Parent state changes when copied from child state changes. How do I prevent this?
I have a parent component. Marketplace.js code- export default function Marketplace() { const [filters, setFilters] = useState( [ { id: 'commodity', name: "Commodity", isSelected: false, type: "select", options: ['A', 'B', 'C', 'D', 'E'], value: null, availableFor: ['classifieds', 'auction'] } ]…