import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';

const MediaBox = ({ src, className, caption, ...props }) =>
  <img className={cx('materialboxed', className)} data-caption={caption} src={src} {...props} />;

MediaBox.propTypes = {
  className: PropTypes.string,
  /**
   * The caption shown below the image when opened
   */
  caption: PropTypes.string,
  /**
   * The path to the image
   */
  src: PropTypes.string.isRequired
};

export default MediaBox;

@@ -5,16 +5,31 @@
 rt React
+, %7B Component %7D
  from 'r
@@ -35,16 +35,16 @@
 react';%0A
-
 import P
@@ -106,25 +106,135 @@
 ;%0A%0Ac
-onst MediaBox = (
+lass MediaBox extends Component %7B%0A  componentDidMount () %7B%0A    $('.materialboxed').materialbox();%0A  %7D%0A%0A  render () %7B%0A    const 
 %7B sr
@@ -270,13 +270,41 @@
 ps %7D
-)
  =
-%3E%0A
+ this.props;%0A%0A    return (%0A    
   %3Ci
@@ -395,17 +395,29 @@
 rops%7D /%3E
-;
+%0A    );%0A  %7D%0A%7D
 %0A%0AMediaB

Fix mediabox cannot be initilized (#300)