parent
6b44610079
commit
3d118de0d5
|
|
@ -3,8 +3,8 @@ import React, { Component } from 'react';
|
|||
export class Counter extends Component {
|
||||
displayName = Counter.name
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = { currentCount: 0 };
|
||||
this.incrementCounter = this.incrementCounter.bind(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ import React, { Component } from 'react';
|
|||
export class FetchData extends Component {
|
||||
displayName = FetchData.name
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = { forecasts: [], loading: true };
|
||||
|
||||
fetch('api/SampleData/WeatherForecasts')
|
||||
|
|
|
|||
Loading…
Reference in New Issue