In a React Native screen component, what is a closure?
- aA function that automatically runs when the component unmounts.
- bA copy of a component's props that never changes after the first render.
- cA function that retains access to variables from the scope it was defined in, even after that scope has finished executing.✓
- dA special React Native API for closing native modules after use.
Explanation:A closure is a function bundled together with references to its surrounding lexical scope. In RN this is why, for example, a callback passed to a
Button onPress can still read a variable declared in the component function body.