. Advertisement .
..3..
. Advertisement .
..4..
I need to complete the exercise how to draw a horizontal line in react native? Can you help me?
import React from "react";
const horizontalLine = ({ color }) => (
...
);
export default function App() {
return (
<div>
<horizontalLine color="yellow" />
</div>
);
}
To create a horizontal line in React, you can add an hr element to the React component. The object style has the color, background-color and height . The color will give the line a solid color and the background-color for other properties.