Skip to content

Commit 0c9fde9

Browse files
state and the constructor
1 parent abc1d83 commit 0c9fde9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/components/App.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,21 @@ import SearchAppointments from './SearchAppointments';
66
import ListAppointments from './ListAppointments';
77

88
class App extends Component {
9+
constructor() {
10+
super();
11+
this.state = {
12+
myName: 'Ray'
13+
};
14+
}
15+
916
render() {
1017
return (
1118
<main className="page bg-white" id="petratings">
1219
<div className="container">
1320
<div className="row">
1421
<div className="col-md-12 bg-white">
1522
<div className="container">
23+
{this.state.myName}
1624
<AddAppointments />
1725
<SearchAppointments />
1826
<ListAppointments />

0 commit comments

Comments
 (0)