Problem with utilizing props
See original GitHub issueVersion
1.4.5
Reproduction
parent.js
<FloatingMenu background="red">
{...}
</FloatingMenu>
child.js
const Container = styled.ul`
background: ${props => props.background}
}
`;
The props.background simply not working at all.
Steps to reproduce
git clone https://github.com/ifndefdeadmau5/react-floating-button-menu npm install npm start
Expected Behavior
The props inside of template literal has to hold received props
Actual Behavior
Got undefined except boolean props. Also, the style doesn’t change whenever props that determines it’s style is changed
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
props in presentations: 4 benefits, 3 problems
Some audiences will react negatively. Use your judgement and common sense. My personal advice is to use props that are the minimum to...
Read more >5 Props Challenges and How to Overcome Them
1. Dealing with a huge list of props · 2. Difficulty working with props · 3. Consumable props · 4. Broken props ·...
Read more >Unknown Prop Warning
The unknown-prop warning will fire if you attempt to render a DOM element with a prop that is not recognized by React as...
Read more >How To Avoid Prop Drilling in React Using Component ...
Prop drilling is similar: You pass data (props) from some FirstComponent to another SecondComponent - which doesn't need the data to render but ......
Read more >Using Props to Initialize State of Component
This implies that the state of the component is tied to the props of the component. The issue with doing this is that...
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
I struggled almost 4 hours like ‘why this simple feature doesn’t work’ and finally decide to report a bug and totally don’t regret it!! Thank you so much
Unfortunately we can’t do any magic and you still have to pass your props around like you do in React.