reactionic icon indicating copy to clipboard operation
reactionic copied to clipboard

React DOM 15.2 Add warning for unknown properties on DOM elements

Open twDuke opened this issue 9 years ago • 18 comments

Warnings in console with latests react-dom

Anything we need to do to fix it from here?

Unknown props customClasses, leftButton, rightButton, history, location, params, route, routeParams, routes, pageList, isFetching, navigate on tag. Remove these props from the element. For details, see https://fb.me/react-unknown-prop in span (created by ReactTransitionGroup) in ReactTransitionGroup (created by ReactCSSTransitionGroup) in ReactCSSTransitionGroup (created by RouteCSSTransitionGroup) in RouteCSSTransitionGroup (created by IonNavBar) in div (created by IonNavBar) in IonNavBar (created by Layout) in div (created by IonSideMenuContent) in IonSideMenuContent (created by Layout) in div (created by IonSideMenuContainer) in IonSideMenuContainer (created by Layout) in Layout (created by Connect(Layout)) in Connect(Layout) (created by RouterContext) in div (created by IonBody) in IonBody (created by App) in App (created by RouterContext) in RouterContext (created by Router) in Router (created by AppRouter) in AppRouter in Provider

https://github.com/facebook/react/releases

twDuke avatar Jul 02 '16 11:07 twDuke

Also having this issue. Any solutions to this?

DarrylD avatar Jul 08 '16 14:07 DarrylD

It is most likely caused by:

Are you using {...this.props} or cloneElement(element, this.props)? Your component is transferring its own props directly to a child element (eg. https://facebook.github.io/react/docs/transferring-props.html). When transferring props to a child component, you should ensure that you are not accidentally forwarding props that were intended to be interpreted by the parent component.

Are you seeing these warnings with the kitchen sink app? If not, please provide some more context.

pors avatar Jul 09 '16 13:07 pors

Moved to react 15.0 was an issue with 15.2

DarrylD avatar Jul 09 '16 15:07 DarrylD

hey @pors! Yes, this happens with the kitchen sink demo. Simply installing the demo did it for me.

modules.js:21375 Warning: Unknown props `customClasses`, `leftButton`, `rightButton`, `history`, `location`, `params`, `route`, `routeParams`, `routes`, `pageList` on <span> tag. Remove these props from the element. For details, see https://fb.me/react-unknown-prop
    in span (created by ReactTransitionGroup)
    in ReactTransitionGroup (created by ReactCSSTransitionGroup)
    in ReactCSSTransitionGroup (created by RouteCSSTransitionGroup)
    in RouteCSSTransitionGroup (created by IonNavBar)
    in div (created by IonNavBar)
    in IonNavBar (created by Layout)
    in div (created by IonSideMenuContent)
    in IonSideMenuContent (created by Layout)
    in div (created by IonSideMenuContainer)
    in IonSideMenuContainer (created by Layout)
    in Layout (created by RouterContext)
    in div (created by IonBody)
    in IonBody (created by App)
    in App (created by RouterContext)
    in RouterContext (created by Router)
    in Router

React 15.2.1.

chrisbolin avatar Jul 28 '16 19:07 chrisbolin

@chrisbolin Hmm, I experience it as well. Where does this suddenly come from I wonder? We didn't do any React updates.

Anyway, this is something we should fix. It's much better practice to peel off props before passing the whole this.props down.

pors avatar Jul 29 '16 15:07 pors

Im having the same issue with my project. But its just after I clone my own repo again and hit npm install after. So I think its due to a never version of react.

JWPapi avatar Aug 11 '16 09:08 JWPapi

Ok checking the versions. Its not happening with react 15.1!

JWPapi avatar Aug 11 '16 09:08 JWPapi

@JWPapi can you try version 1.2.0-beta.0 of reactionic and see if that resolves it? Will make it a new non-beta version soon.

pors avatar Aug 11 '16 09:08 pors

npm install [email protected] nightscool@ C:\Users\jwagner\Documents\TEST\nightscool `-- [email protected] invalid

JWPapi avatar Aug 11 '16 10:08 JWPapi

can you try: npm install reactionic@beta

pors avatar Aug 11 '16 10:08 pors

same

Mark Pors [email protected] schrieb am Do., 11. Aug. 2016 um 12:15 Uhr:

can you try: npm install reactionic@beta

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/reactionic/reactionic/issues/66#issuecomment-239122619, or mute the thread https://github.com/notifications/unsubscribe-auth/AEf_hf_CTWlZQcynIPbd8i3lazhJpUGlks5qevZKgaJpZM4JDp7X .

JWPapi avatar Aug 11 '16 10:08 JWPapi

If you updated your app and the error shows, can you remove node_modules and install again.

In case that wouldn't work, could you upload a repo reproducing the problem.

gabrielseco avatar Aug 11 '16 10:08 gabrielseco

https://github.com/JWPapi/nightscool

This repo comes without node_modules

You wont see much since its based on the DB, but you should get the error after cloning and npm install

JWPapi avatar Aug 11 '16 18:08 JWPapi

I made the next changes to make it work.

In package.json I updated reactionic.

    "reactionic": "1.2.0-beta.0"

And in ui/components/views/Reservation.jsx in line 89 replace the attribute in the label class for className.

Then do a npm install and it should work now.

gabrielseco avatar Aug 12 '16 06:08 gabrielseco

Ok Thank you very much. Im really busy today. Will check it tomorrow and give feedback.

JWPapi avatar Aug 12 '16 11:08 JWPapi

Ok im not getting the warning for unknown properties anymore. Im no having this error:

Warning: You are manually calling a React.PropTypes validation function for the getComponents prop on IndexRoute. 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. See https://fb.me/react-warning-dont-call-proptypes for details.

But I think that might be an issue with my project. Sorry really in a hurry today

JWPapi avatar Aug 12 '16 12:08 JWPapi

Any fix? Still receiving this error today and it's very annoying.

CodeJjang avatar Nov 16 '16 20:11 CodeJjang

The fix pors and gabrielseco mentioned are working. Anyway im Sorry, but Reactionic is not maintained anymore. You could try Onsen, if you not already put in a lot of effort

JWPapi avatar Nov 17 '16 10:11 JWPapi