Inlins CSS Style

PHOTO EMBED

Sun Jun 18 2023 00:34:35 GMT+0000 (Coordinated Universal Time)

Saved by @sarfraz_sheth #react.js

const customStyle = {
  color: "red",
  fontSize: "20px",
  border: "1px solid black"
}  

customStyle.color = "blue";

ReactDOM.render(
  <div>
	<h1 style={customStyle}> inline stly css practice </h1>
// alternative method not recomended
	<h1 style={
      color: "red",
      fontSize: "20px",
      border: "1px solid black"}> 
      inline stly css practice </h1>
  </div>,
  document.getElementById("root"))
content_copyCOPY

yo can change attribute by selecting the key and assigning the new value as shown in this code