question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

It looks like you've wrapped styled() around your React component (ReactTooltip), but the className prop is not being passed down to a child. No styles will be rendered unless className is composed within your React component.

See original GitHub issue
It looks like you've wrapped styled() around your React component (ReactTooltip), but the className prop is not being passed down to a child. No styles will be rendered unless className is composed within your React component.

I get this warning when I use it with Styled-Components as Below

import ReactTooltip from 'react-tooltip
import styled from 'styled-components'

export default styled(ReactToolTip)`
// some styles
`

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ozluycommented, May 9, 2019

Quick fix, you can turn off the warning using .attrs({ suppressClassNameWarning: true }) provided by styled-components as below…

import ReactTooltip from 'react-tooltip
import styled from 'styled-components'

export default styled(ReactToolTip).attrs({ suppressClassNameWarning: true })`
// some styles
`

But the issue must be fixed.

1reaction
yqbkcommented, Feb 10, 2020

@Rogger794 It fixes the problem! Thank you! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

It looks like you've wrapped styled() around your React ...
It looks like you've wrapped styled() around your React component (ReactTooltip), but the className prop is not being passed down to a child....
Read more >
styled-components is saying wrapped styled() around your ...
It looks like you've wrapped styled() around your React component (Component), but the className prop is not being passed down to a child....
Read more >
[Solved]-styled-components is saying wrapped styled() around ...
"It looks like you've wrapped styled() around your React component (Hero), but the className prop is not being passed down to a child."?...
Read more >
Developers - It looks like you've wrapped styled() around your React ...
It looks like you've wrapped styled() around your React component (ReactTooltip), but the className prop is not being passed down to a child....
Read more >
react-tooltip - npm
Start using react-tooltip in your project by running `npm i ... and doing minor testing, but not fixing issues or doing active development....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found