React: useContext value is not updated in the nested function
I have a simple context that sets some value that it get from backend, pseudo code:
I have a simple context that sets some value that it get from backend, pseudo code:
In JavaScript nested functions are very useful: closures, private methods and what have you..
Okay, bear with me on this, I know it’s going to look horribly convoluted, but please help me understand what’s happening.
I have seen and used nested functions in Python, and they match the definition of a closure. So why are they called nested functions
instead of closures
?
What benefit or implications could we get with Python code like this: