JSX - inline CSS style for JSX

0 votes
159 views
added Feb 3, 2020 in JSX by lcjr First Warrant Officer (11,110 points)
// Instead of 
<div id="scroll-header" style="position:fixed; top:52px">

// use this
<div id="scroll-header" style={{position: "fixed", top: "52px"}}>

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...