Manually calling a React.PropTypes validation function React-Materialize

时间:2016-08-31 18:43:00

标签: javascript reactjs materialize

I am having trouble getting rid of this warning:

You are manually calling a React.PropTypes validation function for the large prop on Button. This is deprecated and will not work in the next major version. You may be seeing this warning due to a third-party PropTypes library.

For example, I have a simple Header Component as so:

import React, { Component } from 'react';
import {Button, Icon} from 'react-materialize';

export default class Header extends Component {
  render() {
    return (
      <Button node='a' waves='light'><Icon right>file_cloud</Icon>button</Button>
    );
  }
}

Versions that I am using:

"react": "^0.14.3",
"react-materialize": "^0.15.2"

1 个答案:

答案 0 :(得分:1)

Ok solved it. It looked like I had update my React Library:

"react": "^15.3.1",
"react-dom": "^15.3.1 ",
"react-addons-test-utils": "^15.3.1"