Javascript – My useEffect hook is not working when I'm changing the route
What it did is I fetched some products data in context using useEffect and stored the fetched data in a state. Context Component import { useState, useEffect } from "react"; import ProductContext from "./product-context"; const ProductContextProvider = (props) => {…