@martinbean Currently Laravel nova 4.x load the basic resource meta data via InertiaJS passing them to the page components, and after that on mounted hook (VueJS Nova JS) hit multiple API endpoints to start getting data, (resources, counts, authorization, lenses, tools, etc..) which means more api routes, controllers, requests and resources spent on it,
why not to use Lazy data evaluation, if the page can't be handled in one (initial request), then we can hit same route to load related data something like this
public function __invoke()
{
return [
'resources' => User::paginate(),
'lenses' => Inertia::lazy(fn() => $this->loadLenses()),
'actions' => Inertia::lazy(fn() => $this->loadActions()),
'metrics' => Inertia::lazy(fn() => $this->loadMetrics()),
];
}
Then on JS side
Inertia.reload({ only: ['lenses', 'actions',/*etc...*/] })