This component demonstrates fetching data from the server.
{contents}
diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/src/components/Counter.tsx b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/src/components/Counter.tsx
index a31720c44b..82fde952e6 100644
--- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/src/components/Counter.tsx
+++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/src/components/Counter.tsx
@@ -17,11 +17,11 @@ class Counter extends React.PureComponent {
This is a simple example of a React component.
-
Current count: {this.props.count}
+
Current count: {this.props.count}
diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/src/components/FetchData.tsx b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/src/components/FetchData.tsx
index c177f0bc67..9fed830288 100644
--- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/src/components/FetchData.tsx
+++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/src/components/FetchData.tsx
@@ -7,78 +7,78 @@ import * as WeatherForecastsStore from '../store/WeatherForecasts';
// At runtime, Redux will merge together...
type WeatherForecastProps =
- WeatherForecastsStore.WeatherForecastsState // ... state we've requested from the Redux store
- & typeof WeatherForecastsStore.actionCreators // ... plus action creators we've requested
- & RouteComponentProps<{ startDateIndex: string }>; // ... plus incoming routing parameters
+ WeatherForecastsStore.WeatherForecastsState // ... state we've requested from the Redux store
+ & typeof WeatherForecastsStore.actionCreators // ... plus action creators we've requested
+ & RouteComponentProps<{ startDateIndex: string }>; // ... plus incoming routing parameters
class FetchData extends React.PureComponent {
- // This method is called when the component is first added to the document
- public componentDidMount() {
- this.ensureDataFetched();
- }
+ // This method is called when the component is first added to the document
+ public componentDidMount() {
+ this.ensureDataFetched();
+ }
- // This method is called when the route parameters change
- public componentDidUpdate() {
- this.ensureDataFetched();
- }
+ // This method is called when the route parameters change
+ public componentDidUpdate() {
+ this.ensureDataFetched();
+ }
- public render() {
- return (
-
-
Weather forecast
-
This component demonstrates fetching data from the server and working with URL parameters.
- Previous
- {this.props.isLoading && Loading...}
- Next
-
- );
- }
+ return (
+
+ Previous
+ {this.props.isLoading && Loading...}
+ Next
+
+ );
+ }
}
export default connect(
- (state: ApplicationState) => state.weatherForecasts, // Selects which state properties are merged into the component's props
- WeatherForecastsStore.actionCreators // Selects which action creators are merged into the component's props
+ (state: ApplicationState) => state.weatherForecasts, // Selects which state properties are merged into the component's props
+ WeatherForecastsStore.actionCreators // Selects which action creators are merged into the component's props
)(FetchData as any);