Merged
requested to merge github/fork/amupitan/2303-forgetting-to-return-JSX-should-crash-build into next
Created by: amupitan
Build crashes whenever JSX is not returned as proposed here: #2303 (closed).
The build crashes whenever JSX isn't returned, as opposed to just giving a warning.
To test:
Create a stateless component without a return clause.
For example:
import React from 'react';
export default function Logo(){
<div className="App-header">
<img src="./logo.svg" className="App-logo" alt="logo" />
<h2>Welcome to React</h2>
</div>
}