DEV Community

Discussion on: Latest React Component Syntax, May 2020

Collapse
 
mubbashir10 profile image
Mubbashir Mustafa

The comment wasn't for union types. It was an addition to the article from a purely linting perspective. Let's suppose you have a loader and you are using const [loading, setLoading] = useState<boolean>(false), in that case <boolean> is redundant here.