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 15.2.0 warning: Unknown prop literal on <p> tag #30

Closed
tajo opened this issue Jul 2, 2016 · 4 comments
Closed

React 15.2.0 warning: Unknown prop literal on <p> tag #30

tajo opened this issue Jul 2, 2016 · 4 comments

Comments

@tajo
Copy link

tajo commented Jul 2, 2016

React 15.2.0 throws a warning if you try to assign custom props to DOM elements. Custom props should be assigned only to React components.

warning.js?8a56:44Warning: Unknown prop `literal` on <p> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
    in p (created by ReactMarkdown)
    in div (created by ReactMarkdown)
    in ReactMarkdown (created by MY_APP_COMPONENT)

This warning appears with any source input.
I just had to fix the same thing in my library.

@cythrawll
Copy link

react ticket reference: facebook/react#6800

@tajo
Copy link
Author

tajo commented Jul 6, 2016

In meantime, I can recommend this alternative https://github.com/vincent-p/react-marked-markdown - it's just a wrapper for https://github.com/chjj/marked - works great.

@ktalebian
Copy link

I also get

debugger.js:11382 Warning: Unknown props `level`, `literal`, `nodeKey` on <h2> tag. Remove these props from the element. For details, see https://fb.me/react-unknown-prop
    in h2 (created by Heading)
    in Heading (created by ReactMarkdown)
    in div (created by ReactMarkdown)

@rexxars
Copy link
Collaborator

rexxars commented Jul 9, 2016

Solved in 2.4.0.

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

No branches or pull requests

4 participants