Skip to content

Conversation

@fzaninotto
Copy link
Contributor

Closes #2745

(async () => {
const HydraAdmin = (await import("@api-platform/admin")).HydraAdmin;
// load the admin client-side
const App = dynamic(() => import("../../components/admin/App"), {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the idiomatic way to lazy load a client-side component in next.js (and also the advised way to integrate react-admin and next.js, see https://marmelab.com/react-admin/NextJs.html)

@dunglas dunglas merged commit 8fe4d52 into api-platform:main Aug 6, 2024
@dunglas
Copy link
Member

dunglas commented Aug 6, 2024

Thanks @fzaninotto!

back-2-95 pushed a commit to druidfi/api-platform that referenced this pull request Nov 27, 2024
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.

Make initial admin customization easier

2 participants