Skip to content

Commit 742f035

Browse files
authored
Revert "chore: Replace deprecated "componentWillMount" with "componentDidMount" (#7259)" (#7329)
This reverts commit c0b8ce4.
1 parent 7d64842 commit 742f035

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/react-router-native/experimental/StackRoute.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class StackContainer extends Component {
3535
};
3636
}
3737

38-
componentDidMount() {
38+
componentWillMount() {
3939
this.pushToStack("down");
4040
}
4141

@@ -435,7 +435,7 @@ class StackRootContainer extends Component {
435435
}
436436

437437
class RedirectStack extends Component {
438-
componentDidMount() {
438+
componentWillMount() {
439439
delete rootStoredLocations[this.props.path];
440440
}
441441

packages/react-router/modules/__tests__/Route-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ describe("A <Route>", () => {
238238
const history = createHistory();
239239
const mount = jest.fn();
240240
class MatchedRoute extends React.Component {
241-
componentDidMount() {
241+
componentWillMount() {
242242
mount();
243243
}
244244

0 commit comments

Comments
 (0)