In my current React app, i have a route like
<Route path="products" element={<Products />}>
<Route path=":productId" element={<Product />} />
</Route>
in the Products component, I have an useEffect where I fetch all products.
In the product component, I have another useEffect where I fetch a single product.
Users can edit that product.
in this component, a back button navigates the user to the "/products" route. But this time useEffectwas not triggered in the Products component so updated information on the Product component is not reflected here.