Props shows up as attributes
See original GitHub issueStyled System Props ends up as attributes of DOM elements
is this an intended behaviour ?
even code sandbox link below has the same issue
<h1 font-size="4,5,6" font-weight="bold" class="sc-bdVaJa sc-htpNat sc-bxivhb cNddNq">Hello, Rebass</h1>
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
How React Props relate to HTML attributes and JS functions
In React, “props” is a mix of the two mental models above: HTML attributes and function parameters. When rendering a React component on...
Read more >Why are Styled Component props displaying as HTML ...
Basically if you use a non-camelcase prop to do styling, it'll get passed through to the DOM node. We're looking into better alternatives...
Read more >Render Props - React
And remember, the children prop doesn't actually need to be named in the list of “attributes” in your JSX element.
Read more >React Props Cheatsheet: 10 Patterns You Should Know
Props are a powerful tool to use in React, but how do you use them effectively to write robust, reliable React components and...
Read more >Displaying Data with Props - From JavaScript to React - Next.js
Regular HTML elements have attributes that you can use to pass pieces of information that change the behavior of those elements. For example,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jxnblk What is your recommended way of solving this? I understand the motivation of pushing the responsibility of cleaning props from DOM to a lower-level library, but all the workarounds I see would have to be implemented in Rebass, not my code. Is it possible to use rebass and not have props rendered to DOM right now?
See styled-components/styled-components#439