Sunday 23 December 2018

How to create your first ReactJS application online


We are going to create our first program in react js we don't need to do any setup because we are going to use Codepen.io.
React js is a Library for creating the better Application Design.
Here is my code -:

//HTML //

<div id="app"></div>

//CSS//

.person{
  display:inline-block;
  box-shadow: 0 4px 4px #ccc;
  border-style:solid;
  width:200px;
  border-radius:10px;
  border-shadow:2px 2px;
  margin:20px;
  paddin:20px;
  text-align:center;
  font-family:arial;
  background-color:#008080;
  color:white
}

//React JS Code//

function Person(props){

  return(
  <div class="person">
  <h1> {props.name}</h1>
  <p> Age :{props.age}</p>
</div>
  );
 }
var app = (
  <div>
  <Person name="mariay" age="23"/>
  <Person name="Zerry" age="23"/>
  <Person name="jono" age="24"/>
</div>
);

ReactDOM.render(app,document.querySelector("#app"));

  




No comments:

Post a Comment

😍Developer on Weekends #shorts #officememes #developermemes

😍Developer on Weekends #shorts #officememes #developermemes Welcome to the latest viral YouTube shorts meme for developers! 😍Developer on...