You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following on from a comment on a recent pull request, it might be a good idea to establish module slugs as module-level constants rather than typing the string whenever required.
/** * assets/js/modules/analytics/constants.js */exportconstMODULE_SLUG='analytics';// An additional alias might also be useful when multiple slugs are referenced in a fileexport{MODULE_SLUGasMODULE_SLUG_ANALYTICS};/** * Then, elsewhere: */import{MODULE_SLUG}from'../../constants';import{MODULE_SLUG_ANALYTICS}from'assets/js/modules/analytics/constants';constideaHubConnected=useSelect((select)=>select(CORE_MODULES).isModuleConnected(MODULE_SLUG));constanalyticsConnected=useSelect((select)=>select(CORE_MODULES).isModuleConnected(MODULE_SLUG_ANALYTICS));
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
Test Coverage
Visual Regression Changes
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered:
Feature Description
Following on from a comment on a recent pull request, it might be a good idea to establish module slugs as module-level constants rather than typing the string whenever required.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
Test Coverage
Visual Regression Changes
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: