Update hooks-faq.md (#2340)

Add missing `{`
This commit is contained in:
Cool4ZBL
2019-09-13 00:26:19 +08:00
committed by Alexey Pyltsyn
parent 1f2b1dae94
commit 2efb26ee47

View File

@@ -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