mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-27 03:08:06 +00:00
@@ -655,7 +655,7 @@ function ProductPage({ productId }) {
|
||||
return <ProductDetails fetchProduct={fetchProduct} />;
|
||||
}
|
||||
|
||||
function ProductDetails({ fetchProduct })
|
||||
function ProductDetails({ fetchProduct }) {
|
||||
useEffect(() => {
|
||||
fetchProduct();
|
||||
}, [fetchProduct]); // ✅ All useEffect dependencies are specified
|
||||
|
||||
Reference in New Issue
Block a user