gatsbyjs / gatsby-starter-shopify

A Gatsby starter using the latest Shopify plugin showcasing a store with product overview, individual product pages, and a cart
https://shopify-demo.gatsbyjs.com/
BSD Zero Clause License
311 stars 137 forks source link

Warnings triggered in search.jsx #34

Open mor10 opened 3 years ago

mor10 commented 3 years ago

When booting this starter wile connected to a standard Shopify site, the following warning messages appear:

(...)/src/pages/search.jsx
115:9   warning  The 'productList' logical expression could make the dependencies of useEffect Hook (at line 127) change on every render. To fix this, wrap the initialization of 'productList' in its own useMemo() Hook  react-hooks/exhaustive-deps  
152:6   warning  React Hook React.useEffect has missing dependencies: 'fetchNextPage' and 'hasNextPage'. Either include them or remove the dependency array                                                                react-hooks/exhaustive-deps  
269:31  warning  React Hook useCallback received a function whose dependencies are unknown. Pass an inline function instead                                                                                                react-hooks/exhaustive-deps