Inline JSX Style I always forget

Kevin Kim
1 min readNov 27, 2019

For when I just want to do a quick and dirty check of styling getting implemented properly, this is the JSX convention I should follow:

function HelloHeader() {
return <h1 style={{color: "red", fontSize: "16px"}}>Hello World!</h1>
}

Two curly braces, and then camelCase everything.

Source:

https://dev.to/ceceliacreates/inline-styling-with-jsx-20k0

--

--