Check out example codes for "horizontal line html react". It will help you in understanding the concepts better.

Code Example 1

const ColoredLine = ({ color }) => (
    <hr
        style={{
            color: color,
            backgroundColor: color,
            height: 5
        }}
    />
);

Learn ReactJs, React Native from akashmittal.com