Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f2260d5

Browse filesBrowse files
stephtrSteveSandersonMS
authored andcommitted
Templates: update React's component's State and Property type
1 parent 214a908 commit f2260d5
Copy full SHA for f2260d5

File tree

Expand file treeCollapse file tree

10 files changed

+10
-10
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

10 files changed

+10
-10
lines changed
Open diff view settings
Collapse file

‎templates/ReactReduxSpa/ClientApp/components/Counter.tsx‎

Copy file name to clipboardExpand all lines: templates/ReactReduxSpa/ClientApp/components/Counter.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import * as WeatherForecasts from '../store/WeatherForecasts';
77

88
type CounterProps = CounterStore.CounterState & typeof CounterStore.actionCreators;
99

10-
class Counter extends React.Component<CounterProps, void> {
10+
class Counter extends React.Component<CounterProps, {}> {
1111
public render() {
1212
return <div>
1313
<h1>Counter</h1>
Collapse file

‎templates/ReactReduxSpa/ClientApp/components/FetchData.tsx‎

Copy file name to clipboardExpand all lines: templates/ReactReduxSpa/ClientApp/components/FetchData.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type WeatherForecastProps =
1010
& typeof WeatherForecastsState.actionCreators // ... plus action creators we've requested
1111
& { params: { startDateIndex: string } }; // ... plus incoming routing parameters
1212

13-
class FetchData extends React.Component<WeatherForecastProps, void> {
13+
class FetchData extends React.Component<WeatherForecastProps, {}> {
1414
componentWillMount() {
1515
// This method runs when the component is first added to the page
1616
let startDateIndex = parseInt(this.props.params.startDateIndex) || 0;
Collapse file

‎templates/ReactReduxSpa/ClientApp/components/Home.tsx‎

Copy file name to clipboardExpand all lines: templates/ReactReduxSpa/ClientApp/components/Home.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
export default class Home extends React.Component<void, void> {
3+
export default class Home extends React.Component<{}, {}> {
44
public render() {
55
return <div>
66
<h1>Hello, world!</h1>
Collapse file

‎templates/ReactReduxSpa/ClientApp/components/Layout.tsx‎

Copy file name to clipboardExpand all lines: templates/ReactReduxSpa/ClientApp/components/Layout.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export interface LayoutProps {
55
body: React.ReactElement<any>;
66
}
77

8-
export class Layout extends React.Component<LayoutProps, void> {
8+
export class Layout extends React.Component<LayoutProps, {}> {
99
public render() {
1010
return <div className='container-fluid'>
1111
<div className='row'>
Collapse file

‎templates/ReactReduxSpa/ClientApp/components/NavMenu.tsx‎

Copy file name to clipboardExpand all lines: templates/ReactReduxSpa/ClientApp/components/NavMenu.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import { Link } from 'react-router';
33

4-
export class NavMenu extends React.Component<any, void> {
4+
export class NavMenu extends React.Component<{}, {}> {
55
public render() {
66
return <div className='main-nav'>
77
<div className='navbar navbar-inverse'>
Collapse file

‎templates/ReactSpa/ClientApp/components/Counter.tsx‎

Copy file name to clipboardExpand all lines: templates/ReactSpa/ClientApp/components/Counter.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ interface CounterState {
44
currentCount: number;
55
}
66

7-
export class Counter extends React.Component<any, CounterState> {
7+
export class Counter extends React.Component<{}, CounterState> {
88
constructor() {
99
super();
1010
this.state = { currentCount: 0 };
Collapse file

‎templates/ReactSpa/ClientApp/components/FetchData.tsx‎

Copy file name to clipboardExpand all lines: templates/ReactSpa/ClientApp/components/FetchData.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ interface FetchDataExampleState {
66
loading: boolean;
77
}
88

9-
export class FetchData extends React.Component<any, FetchDataExampleState> {
9+
export class FetchData extends React.Component<{}, FetchDataExampleState> {
1010
constructor() {
1111
super();
1212
this.state = { forecasts: [], loading: true };
Collapse file

‎templates/ReactSpa/ClientApp/components/Home.tsx‎

Copy file name to clipboardExpand all lines: templates/ReactSpa/ClientApp/components/Home.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
export class Home extends React.Component<any, void> {
3+
export class Home extends React.Component<{}, {}> {
44
public render() {
55
return <div>
66
<h1>Hello, world!</h1>
Collapse file

‎templates/ReactSpa/ClientApp/components/Layout.tsx‎

Copy file name to clipboardExpand all lines: templates/ReactSpa/ClientApp/components/Layout.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export interface LayoutProps {
55
body: React.ReactElement<any>;
66
}
77

8-
export class Layout extends React.Component<LayoutProps, void> {
8+
export class Layout extends React.Component<LayoutProps, {}> {
99
public render() {
1010
return <div className='container-fluid'>
1111
<div className='row'>
Collapse file

‎templates/ReactSpa/ClientApp/components/NavMenu.tsx‎

Copy file name to clipboardExpand all lines: templates/ReactSpa/ClientApp/components/NavMenu.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import { Link } from 'react-router';
33

4-
export class NavMenu extends React.Component<any, void> {
4+
export class NavMenu extends React.Component<{}, {}> {
55
public render() {
66
return <div className='main-nav'>
77
<div className='navbar navbar-inverse'>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.