Skip to content

Commit

Permalink
chore: Replace deprecated "componentWillMount" with "componentDidMoun…
Browse files Browse the repository at this point in the history
…t" (#7259)
  • Loading branch information
theboolean authored Apr 14, 2020
1 parent bfe0d2b commit c0b8ce4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/react-router-native/experimental/StackRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class StackContainer extends Component {
};
}

componentWillMount() {
componentDidMount() {
this.pushToStack("down");
}

Expand Down Expand Up @@ -435,7 +435,7 @@ class StackRootContainer extends Component {
}

class RedirectStack extends Component {
componentWillMount() {
componentDidMount() {
delete rootStoredLocations[this.props.path];
}

Expand Down
2 changes: 1 addition & 1 deletion packages/react-router/modules/__tests__/Route-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ describe("A <Route>", () => {
const history = createHistory();
const mount = jest.fn();
class MatchedRoute extends React.Component {
componentWillMount() {
componentDidMount() {
mount();
}

Expand Down

0 comments on commit c0b8ce4

Please sign in to comment.