I recommend following this Youtube video that makes effective use of useContext.
I used said video after following a similar path to what you're on and ran into the same issues of it either not being fully responsive, or causing a flicker each time the webpage loaded.