Skip to content

Commit

Permalink
Adding React component to tutorial/
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed Jan 21, 2021
1 parent 8325430 commit 5ba2099
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tutorial/MadeWithLove.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React from 'react';

export default class MadeWithLove extends React.Component {
constructor(props) {
super(props);

this.state = {
hearts: 1,
};
}

render() {
return (
<div>
<span>Built with </span>
<span
onClick={() => this.setState({
hearts: this.state.hearts + 1,
})}
>
{'❤️'.repeat(this.state.hearts)}
</span>
<span> by your friends at </span>
<a href="https://symfonycasts.com" target="_blank">
SymfonyCasts
</a>
</div>
)
}
}

0 comments on commit 5ba2099

Please sign in to comment.