I am using redux with react. This makes dispatch available as props in component. So when I console.log(this.props)
I see following object in log under dispatch key.
[[Scopes]]: Scopes[5]
0:Closure
1:Closure
2:Closure (createThunkMiddleware)
3:Closure
4:Global
Can someone explain what is this ?
[[Scopes]]
is a private property that Chrome developer tools add and use internally, in C++, here in the source. It displays the variables that are in the scope of a function, i.e. which variables can be accessed from that function.For example:
Here, the function that is attached to property
obj.bar
has variablefoo
in its scope, so when we inspect the[[Scopes]]
propety ofobj.bar
we see something likeYou can manually inspect these properties in the console, which might be helpful for debugging, but you can't access them using JavaScript and you shouldn't care about them in your application code.
See also: SO - Access function location programmatically.