Skip to content

Instantly share code, notes, and snippets.

@FagnerMartinsBrack
Last active February 15, 2018 08:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FagnerMartinsBrack/dacd9287230810f06b651e38be0c901a to your computer and use it in GitHub Desktop.
Save FagnerMartinsBrack/dacd9287230810f06b651e38be0c901a to your computer and use it in GitHub Desktop.
(Medium) Front-End Separation
//=============================
// THE API BACK-END PROJECT
//=============================
const userDetailsParsedResponseBody = {
- givenName: 'John',
- surname: 'Doe',
+ firstName: 'John',
+ lastName: 'Doe',
};
// ...
//=============================
// THE CLIENT FRONT-END PROJECT
//=============================
// ...
render() {
const userDetails = this.props.userDetails;
return <section>
// 🔥🔥 BOOM 🔥🔥 <h1>undefined undefined</h1>
<h1>{userDetails.givenName + ' ' + userDetails.surname}</h1>
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment