Skip to content

Instantly share code, notes, and snippets.

@purushotamrai
Created February 14, 2019 17:11
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 purushotamrai/c8638158d5a1cfa7b660b5c506805bfe to your computer and use it in GitHub Desktop.
Save purushotamrai/c8638158d5a1cfa7b660b5c506805bfe to your computer and use it in GitHub Desktop.
Getting Started with ReactJS and Drupal - Step 4.2 - DestinationItem.js
import React from 'react';
export default class DestinationItem extends React.Component {
render() {
return (
<div>
<h2>{this.props.attributes.title}</h2>
<div dangerouslySetInnerHTML={{__html: this.props.attributes.body.value}} />
</div>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment