Permalink
Browse files

Specified that <ButtonWidget> takes a 'prop' of 'caption' that is of …

…type 'string' and is required. From now on, not passing this prop will result in a runtime warning emitted to the JavaScript console.
  • Loading branch information...
maratbn committed Jun 30, 2018
1 parent 1f72ad2 commit 7ac62909045ba80a088034c0c9cc1682b44d6d65
Showing with 5 additions and 0 deletions.
  1. +5 −0 webpack_in/entry.jsx
@@ -6,6 +6,7 @@
console.log("JSX entry logic.");
import PropTypes from 'prop-types';
import React from 'react';
import ReactDOM from 'react-dom';
@@ -29,6 +30,10 @@ class ButtonWidget extends React.Component {
}
}
ButtonWidget.propTypes = {
caption: PropTypes.string.isRequired
};
class HelloWidget extends React.Component {
render() {
return (

0 comments on commit 7ac6290

Please sign in to comment.