Skip to content

Commit ec15844

Browse files
committed
docs: minor fixes
1 parent 20b88ed commit ec15844

5 files changed

+14
-14
lines changed

website/pages/docs/rules/no-access-state-in-setstate.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ import React from "react";
3838

3939
interface MyComponentProps {}
4040

41-
interface ExampleState {
41+
interface MyComponentState {
4242
foo: number;
4343
}
4444

45-
class MyComponent extends React.Component<MyComponentProps, ExampleState> {
45+
class MyComponent extends React.Component<MyComponentProps, MyComponentState> {
4646
state = {
4747
foo: 1,
4848
};
@@ -64,11 +64,11 @@ import React from "react";
6464

6565
interface MyComponentProps {}
6666

67-
interface ExampleState {
67+
interface MyComponentStateState {
6868
foo: number;
6969
}
7070

71-
class MyComponent extends React.Component<MyComponentProps, ExampleState> {
71+
class MyComponent extends React.Component<MyComponentProps, MyComponentState> {
7272
state = {
7373
foo: 1,
7474
};

website/pages/docs/rules/no-direct-mutation-state.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ import React from "react";
4040

4141
interface MyComponentProps {}
4242

43-
interface ExampleState {
43+
interface MyComponentStateState {
4444
foo: string;
4545
}
4646

47-
class MyComponent extends React.Component<MyComponentProps, ExampleState> {
47+
class MyComponent extends React.Component<MyComponentProps, MyComponentState> {
4848
state = {
4949
foo: "bar",
5050
};
@@ -72,11 +72,11 @@ import React from "react";
7272

7373
interface MyComponentProps {}
7474

75-
interface ExampleState {
75+
interface MyComponentStateState {
7676
foo: string;
7777
}
7878

79-
class MyComponent extends React.Component<MyComponentProps, ExampleState> {
79+
class MyComponent extends React.Component<MyComponentProps, MyComponentState> {
8080
state = {
8181
foo: "bar",
8282
};

website/pages/docs/rules/no-set-state-in-component-did-mount.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ import React from "react";
3838

3939
interface MyComponentProps {}
4040

41-
interface ExampleState {
41+
interface MyComponentStateState {
4242
name: string;
4343
}
4444

45-
class MyComponent extends React.Component<MyComponentProps, ExampleState> {
45+
class MyComponent extends React.Component<MyComponentProps, MyComponentState> {
4646
componentDidMount() {
4747
this.setState({ name: "John" });
4848
// ^^^^^^^^^^^^^^^^^^^^^^^^^^

website/pages/docs/rules/no-set-state-in-component-did-update.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ import React from "react";
3838

3939
interface MyComponentProps {}
4040

41-
interface ExampleState {
41+
interface MyComponentStateState {
4242
name: string;
4343
}
4444

45-
class MyComponent extends React.Component<MyComponentProps, ExampleState> {
45+
class MyComponent extends React.Component<MyComponentProps, MyComponentState> {
4646
componentDidUpdate() {
4747
this.setState({ name: "John" });
4848
// ^^^^^^^^^^^^^^^^^^^^^^^^^^

website/pages/docs/rules/no-set-state-in-component-will-update.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ import React from "react";
3838

3939
interface MyComponentProps {}
4040

41-
interface ExampleState {
41+
interface MyComponentStateState {
4242
name: string;
4343
}
4444

45-
class MyComponent extends React.Component<MyComponentProps, ExampleState> {
45+
class MyComponent extends React.Component<MyComponentProps, MyComponentState> {
4646
componentWillUpdate() {
4747
this.setState({ name: "John" });
4848
// ^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)