From 4c50a8676b41fdcc5d46e9608da1c9ca9ffb86d8 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 20 Dec 2017 13:57:15 +0300 Subject: update to React 16 --- vnext/src/components/message.jsx | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'vnext/src/components') diff --git a/vnext/src/components/message.jsx b/vnext/src/components/message.jsx index faeb4b4e..78ebdd38 100644 --- a/vnext/src/components/message.jsx +++ b/vnext/src/components/message.jsx @@ -1,15 +1,7 @@ -import React, {PropTypes} from "react" +import React from 'react' +import PropTypes from 'prop-types' -const Message = React.createClass({ - propTypes: { - mid: PropTypes.number.isRequired, - user: PropTypes.shape({ - uid: PropTypes.number.isRequired, - uname: PropTypes.string.isRequired - }), - timestamp: PropTypes.string.isRequired, - body: PropTypes.string.isRequired - }, +export default class Message extends React.Component { render() { return (
) } -}); +}; -export default Message \ No newline at end of file +Message.propTypes = { + mid: PropTypes.number.isRequired, + user: PropTypes.shape({ + uid: PropTypes.number.isRequired, + uname: PropTypes.string.isRequired + }), + timestamp: PropTypes.string.isRequired, + body: PropTypes.string.isRequired +} -- cgit v1.2.3