TS2786 – X cannot be used as a JSX component + unreachable code

Problem You’re running into the following two symptoms: Compiler error TS2786: ‘ComponentName’ cannot be used as a JSX component. Its return type ‘void’ is not a valid JSX element. VS Code is showing you an “Unreachable code” message (and is unhelpfully showing you the option to “Remove unreachable code”). You unintentionally have a void return … Read more