diff --git a/packages/jaeger-ui/src/components/TracePage/ArchiveNotifier/index.tsx b/packages/jaeger-ui/src/components/TracePage/ArchiveNotifier/index.tsx index 8df9d7a19e..5fdeab6527 100644 --- a/packages/jaeger-ui/src/components/TracePage/ArchiveNotifier/index.tsx +++ b/packages/jaeger-ui/src/components/TracePage/ArchiveNotifier/index.tsx @@ -111,12 +111,9 @@ export default class ArchiveNotifier extends React.PureComponent { this.state = { notifiedState }; } - // eslint-disable-next-line camelcase - UNSAFE_componentWillReceiveProps(nextProps: Props) { - const notifiedState = processProps(this.state.notifiedState, nextProps); - if (this.state.notifiedState !== notifiedState) { - this.setState({ notifiedState }); - } + static getDerivedStateFromProps(props: Props, state: State) { + const notifiedState = processProps(state.notifiedState, props); + return { notifiedState }; } componentWillUnmount() {