javascript
javascript copied to clipboard
Do not use lodash's uniqueId for component ids
Explanation
In hindsight, lodash's uniqueId is not handy to use in component Ids because snapshots and other tests need to get updated if the amount of times it is called changes.
It is being used as ID property in the following places:
SnippetEditorFieldsuses it for the slug and label.HelpTextWrapperuses it for the panel id.ReplacementVariableEditoruses it for the editor and label.- The content analysis app's
SelectTestPaperuses it for the select id.
Technical decisions
For inspiration / context see the PR where this was changed for the KeywordInput and SynonymsInput components: https://github.com/Yoast/javascript/pull/263
Maybe the SelectTestPaper one is not that interesting since it is a test app.