Use prop-types package instead of React.PropTypes.

This commit is contained in:
Daniel Ternyak 2017-04-14 01:26:25 -05:00
parent 00c808fd7f
commit 498fbfcf41
2 changed files with 7 additions and 6 deletions

View File

@ -1,4 +1,5 @@
import React, {Component} from 'react'; import React, {Component} from 'react';
import PropTypes from 'prop-types';
export default class GenerateWalletPasswordComponent extends Component { export default class GenerateWalletPasswordComponent extends Component {
constructor(props) { constructor(props) {
@ -6,10 +7,10 @@ export default class GenerateWalletPasswordComponent extends Component {
} }
static propTypes = { static propTypes = {
title: React.PropTypes.string, title: PropTypes.string,
body: React.PropTypes.string, body: PropTypes.string,
userId: React.PropTypes.number, userId: PropTypes.number,
id: React.PropTypes.number id: PropTypes.number
}; };
render() { render() {

View File

@ -1,6 +1,6 @@
import React, {Component} from 'react' import React, {Component} from 'react'
import {Card, Loader, Grid} from 'semantic-ui-react'
import GenerateWalletPasswordComponent from './GenerateWalletPasswordComponent' import GenerateWalletPasswordComponent from './GenerateWalletPasswordComponent'
import PropTypes from 'prop-types';
export default class GenerateWalletComponent extends Component { export default class GenerateWalletComponent extends Component {
constructor(props) { constructor(props) {
@ -8,7 +8,7 @@ export default class GenerateWalletComponent extends Component {
} }
static propTypes = { static propTypes = {
statistics: React.PropTypes.array statistics: PropTypes.array
} }
render() { render() {