Use third party component seems to be broken
See original GitHub issueVersion
1.0.9
I can’t use the third party wrapper and get no styles on my rendered component:
import React from 'react';
import styled from 'styled-components';
class Nav extends React.Component {
render() {
return (
<nav>
<button info type="button">REGISTER</button>
<button type="button">LOGIN</button>
</nav>
);
}
}
let Nav2 = styled(Nav)`
color: #222;
border: 3px solid red;
background: blue;
font-size: 1.5em;
font-family: Helvetica, Arial, sans-serif;
text-align: center;
`;
export default Nav2;
Reproduction
http://www.webpackbin.com/EyvHTuK1f
Expected Behavior
Expect Nav border to be 3px solid and red and background blue
Actual Behavior
Nav use default styling
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Static analysis error when using custom 3rd party component ...
After hours of digging and trial and error I found the answer. In my question edit I refer to this page and claim...
Read more >Disable react strict mode on third party libraries #16362 - GitHub
But I'm using third party libraries (like old react-bootstrap). ... The other issue is that strict mode seems to break functionality.
Read more >OWASP Using Components with Known Vulnerabilities
Virtually every application has issues with keeping these components patched and updated. SECURING THIRD-PARTY SOFTWARE COMPONENTS. Component vulnerabilities ...
Read more >Third-Party Components at Their Best - CSS-Tricks
React encourages CSS-in-JS and now the majority of the React third-party-packages we use default to that and have limited or broken class-based ...
Read more >Bypass, remove, or rescan Audio Units plug-ins in Logic Pro ...
Learn what to do if you're using third-party Audio Units plug-ins and Logic Pro or MainStage isn't working properly, or if you can't...
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
Let me tell you something @santaclauze – never ever be afraid to ask a question or say your opinion. As soon as you stop being curious, you stop learning. Always ask questions, figure out what you want to know, discuss with people!
Good luck with learning to code! 😊
@santaclauze You’re missing a small piece. If you look at the Third Party component part of the docs you will see a note about including a
className
on the “third-party” component you are styling in order for the class that is generated to be properly applied.Here is an example: http://www.webpackbin.com/4JR5NCY1f