ReactJS: Format A Name

This entry is part 10 of 35 in the series React JS

https://codepen.io/gaearon/pen/PGEjdG

function formatName(user) {
  return user.firstName + ' ' + user.lastName;
}

const user = {
  firstName: 'Harper',
  lastName: 'Perez'
};

const element = (
  <h1>
    Hello, {formatName(user)}!
  </h1>
);

ReactDOM.render(
  element,
  document.getElementById('root')
);

Series Navigation<< ReactJS: Formatting a border
ReactJS: Hello World >>