Thanks for the reading materials. I have read your post at least briefly. There's a lot to digest. The reconciliation docs covers a lot of my confusion. Here's what I mean by back channel.
function fn(arg) {
let foo = useFoo();
// do something with arg and foo
}
The way I understand the words, `fn` is a function of `arg`. `foo` was acquired by a "back channel".
I sorta see what you're saying, in that `foo` wasn't passed into this function as an argument. But I do still think this is a general misconception of how React works.
Every React component, whether it's written as a class component or a function component, has props and optional state. In class components, those are accessed as `this.props` and `this.state`, which may seem "familiar" for folks who are used to OOP usage. But, as I note above, the fact that you can even access them as `this.something` is only because React itself has done the work to track those values in its internal `Fiber` structures, and assign them to the component fields when it's ready to render the component.
For function components, it's the same thing, with slightly different syntax. Function components always get `props` as the one argument to the function. State, in the form of the `useState` and `useReducer` hooks, is accessed on-demand, but it's still coming from React's source of truth: the `Fiber` object that represents React's tracking of this component instance.
I'll agree that it's not an _obvious_ argument to the component. But then again, neither is React Context, which is another source of input to components that isn't directly passed in as props either. That's my point - it's really all about React storing the data for a component internally, and then making that accessible to the component as needed while rendering.