-
Notifications
You must be signed in to change notification settings - Fork 115
React 16 "Expected onClick
listener to be a function, instead got a value of boolean
type"
#94
Comments
…unction or undefined for the onclick handler, instead of function or boolean, as react 16 warns about booleans
Just created a PR for fixing this issue here : #97 redux-devtools-log-monitor depends of it. |
There was already a PR open for this #95 But I like @GuillaumeCisco solution better, it makes sense to put the if in the |
React 16 warns and ignores boolean values in non-boolean attributes. React 15 converted these to strings and passed through. Replacing logical operators with ternary in attributes removes the warning. alexkuz/react-json-tree#94 https://facebook.github.io/react/blog/2017/09/08/dom-attributes-in-react-16.html
Can we merge it, so? |
what in the end decided? I get the same warning.. |
@arman-mukatov With which code? |
@alexkuz any chance you can merge and release this? |
Heads up for anyone else blocked by this: I released a forked version of this package with the React 16 fix under Feel free to submit PRs there as well, until we get confirmation that this repository is still maintained. |
I'll try to review this and other PRs this weekend. |
…s warnings (alexkuz/react-json-tree#94). Fix syntymaaika default value.
Can we have some hope of a merge here followed by a release? |
Yes, please release this. This error spams my console over and over to the point that I had to disable DevTools. |
going to disable devTools too, waiting the release |
Published in |
Sorry @alexkuz , I'm still getting
|
@foxhound87, the issue is now in the redux devtools repo, please upvote it |
@GuillaumeCisco I'm not using redux devtools |
@foxhound87 So there is surely another part of the code that do this. |
I’m using the package in this project: |
UP |
I just updated to React 16 and now I'm seeing lots of warnings from react-json-tree (via redux-log-monitor):
I believe this is due to the DOM attribute changes in React 16, specifically the "Non-boolean attributes with boolean values" described here - https://facebook.github.io/react/blog/2017/09/08/dom-attributes-in-react-16.html.
And in react-json-tree the culprit is
src/JSONNestedNode.js
:Where
{expandable && this.handleClick}
will evaluate tofalse
if expandable is false.The text was updated successfully, but these errors were encountered: