Let’s look at how we can adapt the right mental model of useEffect to fix the exhaustive-deps warning.…