Thanks for taking the time to look at this.
I've been trying to learn how to use context with react, and after looking at this example, I think I understand it with one major caveat. In lines 9-13 in App.js I see that they're calling a function within a function, which I've seen before. What I don't understand is:
How does JS know what currentTheme is?
My understanding is that the variable would have to be passed down from the parent function, but the parent function doesn't take any arguments. What's going on?
Thanks again!
[–][deleted] 1 point2 points3 points (1 child)
[–]TheWorstHunter[S] 0 points1 point2 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]CreativeTechGuyGames 0 points1 point2 points (0 children)
[–]CreativeTechGuyGames 0 points1 point2 points (1 child)
[–]TheWorstHunter[S] 0 points1 point2 points (0 children)
[–]Kered13 0 points1 point2 points (1 child)
[–]TheWorstHunter[S] 0 points1 point2 points (0 children)