Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React 16 and PropTypes check #15

Open
danielesalvatore opened this issue Dec 2, 2017 · 1 comment
Open

React 16 and PropTypes check #15

danielesalvatore opened this issue Dec 2, 2017 · 1 comment

Comments

@danielesalvatore
Copy link

Hello there,
Any plan to update the component to work with React 16 and the PropTypes package?
I get the following error while I use the component.

Answer.js:43 Uncaught TypeError: Cannot read property 'bool' of undefined
    at Object../node_modules/react-quiz/Answer.js (Answer.js:43)
    at __webpack_require__ (bootstrap c83ab5fe0ab30558b35a:698)
    at fn (bootstrap c83ab5fe0ab30558b35a:111)
    at Object../node_modules/react-quiz/Question.js (Question.js:11)
    at __webpack_require__ (bootstrap c83ab5fe0ab30558b35a:698)
    at fn (bootstrap c83ab5fe0ab30558b35a:111)
    at Object../node_modules/react-quiz/Quiz.js (Quiz.js:13)
    at __webpack_require__ (bootstrap c83ab5fe0ab30558b35a:698)
    at fn (bootstrap c83ab5fe0ab30558b35a:111)
    at Object../node_modules/react-quiz/index.js (index.js:8)
    at __webpack_require__ (bootstrap c83ab5fe0ab30558b35a:698)
    at fn (bootstrap c83ab5fe0ab30558b35a:111)
    at Object../src/containers/quizSingle/index.js (selector.js:19)
    at __webpack_require__ (bootstrap c83ab5fe0ab30558b35a:698)
    at fn (bootstrap c83ab5fe0ab30558b35a:111)
    at Object../src/containers/app/index.js (constants.js:3)
    at __webpack_require__ (bootstrap c83ab5fe0ab30558b35a:698)
    at fn (bootstrap c83ab5fe0ab30558b35a:111)
    at Object../src/index.js (index.css?f255:26)
    at __webpack_require__ (bootstrap c83ab5fe0ab30558b35a:698)
    at fn (bootstrap c83ab5fe0ab30558b35a:111)
    at Object.0 (index.js:7)
    at __webpack_require__ (bootstrap c83ab5fe0ab30558b35a:698)
    at bootstrap c83ab5fe0ab30558b35a:796
    at bundle.js:800

The corresponding line in Answer.js and the propType check that fails

Answer.propTypes = {
  active: _react2.default.PropTypes.bool.isRequired,
  onClick: _react2.default.PropTypes.func,
  children: _react2.default.PropTypes.node.isRequired
};
@danielesalvatore
Copy link
Author

Just open a pull request with the fix #16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant