JSX doesn't affect anything in this scenario compared to normal JS syntax.
export default function App() {
return <h1>Hello World</h1>;
//^^^^^^ ^
// ^^^^^^^^^^^^^^^^^^^^
// 1 2 3
//keyword expression end of statement
}
When writing code using JSX syntax, each JSX expression is simply an expression, like any other expression. More specifically, each JSX expression is evaluated by the transpiler and converted into a function invocation expression — you can read more at the article JSX In Depth on the React website.
Whether you return a JSX value or a number value or a string value makes no difference in regard to the need for a semicolon.
const myValue = "hello world";
export default function () {
return myValue;
//^^^^^^ ^
// ^^^^^^^
// 1 2 3
//keyword ^ end of statement
// expression
}
Regarding semicolon usage: I won't get into the reasons why semicolons should be used — that has already been covered on this site.