When I watch tutorials they try to read this.props without defining the term props anywhere. Is props a keyword? If not how does React know that it is props without defining it anywhere in the code?
No, props isn't a keyword. The React.Component constructor receives the props object (because React.createElement passes them to the component function as the first argument; JSX generates the calls to React.createElement) and assigns props to the instance being created, like this:
constructor(props) {
// ^^^^^−−−−−−−−−−− parameter
this.props = props;
// ^^^^^^^^^^^^^^^^^^−−−−−− assignment
// ...
}
That's why if you create your own constructor, you have to pass the object you receive as the first parameter to super like this:
class MyComponent extends React.Component {
constructor(props) {
super(props);
// ^^^^^^−−−−−−−−− passing them on to `super`
// ...
}
}