ClipboardCopy doesn't update when children are updated
See original GitHub issueThe ClipboardCopy
component should be updating along with the counter in that video, but it doesn’t.
Here’s the code to generate that example:
class Test extends React.Component<{}, { counter: number }> {
constructor(props) {
super(props);
this.state = { counter: 0 };
}
componentDidMount() {
setInterval(
() => this.setState({ counter: this.state.counter + 1 }),
1000,
);
}
render() {
return (
<React.Fragment>
{this.state.counter.toString()}
<ClipboardCopy>{this.state.counter.toString()}</ClipboardCopy>
</React.Fragment>
);
}
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Clipboard not working - Microsoft Community
Written Jul 14/2020: Since the most recent Windows 10 update, clipboard does not work. "Paste" in greyed and will not function.
Read more >iOS 16.1 Introduces New Copy-and-Paste Permission Settings ...
iOS 16 introduced a new privacy feature that requires apps to receive a user's permission before directly accessing their iPhone's clipboard.
Read more >Cut, copy, and paste between iPad and other devices
Cut, copy, and paste between iPad and other devices. You can use Universal Clipboard to cut or copy content (a block of text...
Read more >How to Fix Copy and Paste Not Working in Windows 11
How to Fix Copy and Paste Not Working in Windows 11 · 1. Perform a Clean Boot · 2. Update Your Windows ·...
Read more >Copy and paste objects in the canvas – Figma Help Center
Use the Paste to replace function to remove a selected object from your canvas or frame and replace it with the object copied...
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 Free
Top 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
@newswangerd submitted a PR for it in #2849, luckily it’s an easy fix 😃
@redallen I tested it on code sandbox, and it worked. I did some digging and it turns out this was breaking on my app because the dependencies didn’t get reloaded correctly after I updated them. Sorry to bother you with this!