Skip to content

Fixed deprecated React lifecycle method#788

Open
semilooreajao wants to merge 1 commit intoalphagov:mainfrom
semilooreajao:fix/deprecated-react-lifecycle
Open

Fixed deprecated React lifecycle method#788
semilooreajao wants to merge 1 commit intoalphagov:mainfrom
semilooreajao:fix/deprecated-react-lifecycle

Conversation

@semilooreajao
Copy link
Copy Markdown

Fix deprecated React lifecycle method (componentWillMount)

Changes

Moved componentWillMount logic into the constructor and removed the method.

Replaced componentWillReceiveProps with componentDidUpdate to reset debounced when queryLength changes.

No behavioural changes to the component.

Notes

Removed a legacy test that manually invoked componentWillMount, since the method no longer contains logic and is not part of the updated lifecycle flow. Behaviour is unchanged and all remaining tests pass.

Related issue: #418

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 24, 2026

Deploy Preview for accessible-autocomplete ready!

Name Link
🔨 Latest commit f958ca3
🔍 Latest deploy log https://app.netlify.com/projects/accessible-autocomplete/deploys/69c27ddbdf10b30008be30c5
😎 Deploy Preview https://deploy-preview-788--accessible-autocomplete.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant