Warning: UNSAFE_componentWillMount in ProgressTracker when using React Strict Mode

Hey Atlassians,

When using the ProgressTracker component in a React application with Strict Mode enabled, the following warning appears:

Warning: Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.

This warning suggests that the ProgressTracker component relies on the deprecated UNSAFE_componentWillMount lifecycle method, which is not recommended in modern React applications.

Steps to Reproduce:

  1. Use the ProgressTracker component in a React app with Strict Mode enabled.
  2. Observe the warning in the console.

Expected Behavior:
The component should not use deprecated lifecycle methods and should be compatible with React Strict Mode.

Suggested Solution:
Update the ProgressTracker component to use safe lifecycle methods like componentDidMount or refactor it to use hooks if applicable.

Environment:

  • React version: ^18.3.1
  • @atlaskit/progress-tracker version: ^9.0.2
  • Browser: Firefox

Thank you for offering Atlaskit and DS!

This post created with the help of AI, any feedback let me know.