I am trying to do some inline CSS style in my React components. I am aware of pros/cons and all of the fancy libraries out there but I'm curious about this specific case.
This is the code:
import React from 'react';
const Menu = () => (
<ul style={styles}>
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
)
const styles = {
listStyle: 'none',
}
export default Menu;
I want to apply some style to "li" elements, but how to do so without writing style={styles} for every single "li" element? For example, display:inline for all "li" elements purely in javascript?
P.S.: I'm aware of articles and resources (I read a lot of them), please, don't include such sources as answer, because it's really not helpful for me.
Thanks in advance.