Skip to content

Update plugin Component examples to use non-deprecated import pattern#3111

Merged
pwizla merged 2 commits intomainfrom
fix/menu-link-default-export
May 5, 2026
Merged

Update plugin Component examples to use non-deprecated import pattern#3111
pwizla merged 2 commits intomainfrom
fix/menu-link-default-export

Conversation

@jhoward1994
Copy link
Copy Markdown
Contributor

@jhoward1994 jhoward1994 commented Apr 30, 2026

What does it do?

Updates the plugin development docs so every addMenuLink / createSettingSection / addSettingsLink / addSettingsLinks example uses the non-deprecated, type-correct Component pattern:

Component: () => import('./pages/App'),

instead of the previously documented:

Component: async () => {
  const { App } = await import('./pages/App');
  return App;
},

The page module (e.g. admin/src/pages/App.tsx) must therefore export the component as default.

A short :::note block has been added under the menu-link example to call this requirement out for users migrating from the old pattern.

Why is it needed?

The current docs pattern is deprecated by @strapi/admin's own runtime and inconsistent with the typed signature the runtime ships:

I think the docs are showing a pattern that Strapi itself asks users to stop
using, and that doesn't typecheck against the API's published types.

Support for sdk-plugin work from strapi/sdk-plugin#107

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
documentation Ready Ready Preview, Comment Apr 30, 2026 0:58am

Request Review

@github-actions github-actions Bot added internal PRs created by the Strapi core team pr: updated content PRs updating existing documentation content source: CMS labels Apr 30, 2026
Copy link
Copy Markdown
Collaborator

@pwizla pwizla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect! Thank you, Jamie! 🚀

@pwizla pwizla added this to the 6.24.0 milestone Apr 30, 2026
@pwizla pwizla self-assigned this Apr 30, 2026
@pwizla pwizla added pr: chore flag: merge pending release Pending Strapi Release and removed internal PRs created by the Strapi core team pr: updated content PRs updating existing documentation content labels Apr 30, 2026
@jhoward1994
Copy link
Copy Markdown
Contributor Author

Thanks both! @pwizla I think we can actually go ahead and merge this now. It's accurate today and doesn't need to wait on strapi/sdk-plugin#107 or any other PRs

@pwizla pwizla added internal PRs created by the Strapi core team and removed flag: merge pending release Pending Strapi Release labels May 5, 2026
@pwizla pwizla merged commit df78950 into main May 5, 2026
19 of 21 checks passed
@pwizla pwizla deleted the fix/menu-link-default-export branch May 5, 2026 14:06
pwizla added a commit that referenced this pull request May 5, 2026
…#3111) (#3117)

Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal PRs created by the Strapi core team pr: chore source: CMS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants