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
What is the right way to use laravel-data with Inertias V2 Deferred props?
When I do: songs' => Inertia::defer(fn () => SongData::collect(Songs::all()),
The data is available in the front end, but I'm unable to loop over it.
I'm using React and it says that map is undefined.
When I return the plain results like songs' => Inertia::defer(fn () => Songs::all()),
The Deferred props works like a charm, and I can loop over the results.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
What is the right way to use laravel-data with Inertias V2 Deferred props?
When I do:
songs' => Inertia::defer(fn () => SongData::collect(Songs::all()),
The data is available in the front end, but I'm unable to loop over it.
I'm using React and it says that
map
is undefined.When I return the plain results like
songs' => Inertia::defer(fn () => Songs::all()),
The Deferred props works like a charm, and I can loop over the results.
Beta Was this translation helpful? Give feedback.
All reactions