DEV Community

Discussion on: React Hooks (useContext, useEffect, useState, useRef) Summarized Like Crazy (Short & Concise Article)

Collapse
 
esbblo profile image
Esbjörn Blomquist

You could simplify
return <>{isVisible && <h1>I'm visible</h1>}</>;
to
return isVisible && <h1>I'm visible</h1>;

and I think this is a syntax error:
<ScrollView onContentSizeChange={() => }>

Collapse
 
ishakmohmed profile image
Mohmed Ishak

Yes could've simplified that one. As for the syntax error, it's not a syntax error, but just the opening tag of ScrollView component in React Native. I wrote "//..." below that line to indicate that more content is expected in the code snippet but that content doesn't matter for the tutorial. I hope we're friends now hehehehh.