Categories
Mastering Development

Use Material-UI HOC in Class Component

I’m trying to use material UI in my class component, instead of converting everything to Hooks. I’m not sure which method is easier, Hooks or retro-fitting what I have. Here’s my code: class App extends Component { constructor(props) { super(props); this.state = { hits: [], desc: [], }; } componentDidMount() { this.fetchData(); } fetchData() { […]

Categories
Development

Give each Popper its how className

I have a componet that creates 6 experiences each one with its own popper. I want to edit the popper’s so that each popper has its each style (background and possition) and I want them all to have the same size image. I have tried edditing the paper style and adding a className with the […]

Categories
Development

Copy to clipboard is including parent of targeted element

Edit – Additional info: Simplified sandbox – https://codesandbox.io/s/stupefied-leftpad-k6eek Demo: https://imgur.com/a/SDWTQno Issue doesn’t seem to be happening on firefox but is on chrome and other browsers I have a div that renders a template (simplified in above link) which is hooked up to a button that calls a function that copies to clipboard. However when pasting […]