import React, { useState} from "react";
function App() {
const [value, setValue] = useState("Hello");
const handleClick = (e) => {
setValue(prompt("введите значение", value))
}
return (
<div className="App">
<ul>
<li onClick={handleClick}>{value}</li>
</ul>
</div>
);
}
const products = filteredProducts.filter(product => product.category === "Some, category").map (item => {
return (
<ProductCard
key={item.id}
product = {item}
/>)} )
return (
<div className="products-list">
<Title title="Some Title" />
<div className="products-container">
<p> {products.length} </p>
</div>
<div className="products-container">
{products}
</div>
</div>
)
this.state = {prodaction: []}