Created
October 2, 2022 20:06
-
-
Save ProspektsMarch22/3a90879ac5befd82c0151c927c37fe6b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import { Button } from './Button'; | |
class Talker extends React.Component { | |
talk() { | |
let speech = ''; | |
for (let i = 0; i < 10000; i++) { | |
speech += 'blah '; | |
} | |
alert(speech); | |
} | |
render() { | |
return <Button talk={this.talk}/>; | |
} | |
} | |
ReactDOM.render( | |
<Talker />, | |
document.getElementById('app') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment