Skip to content

Conversation

JustSteveKing
Copy link

Adding a PaginatedResult interface with generics to allow for better typed pagination between Laravel and Inertia/Vue.

An example implementation for you Inertia page, passing the generic type you expect to paginate through to the paginated result

const props = defineProps<{
  projects: PaginatedResult<Project>;
}>();

Adding a `PaginatedResult` interface with generics to allow for better typed pagination between Laravel and Inertia/Vue
@JustSteveKing
Copy link
Author

@tnylea let me know if this is ok or you want the interface broken up a little more 🤗

@tnylea
Copy link
Contributor

tnylea commented Apr 14, 2025

Hey @JustSteveKing, thanks for the PR. It looks great.

Could you also open a PR for this PaginatedResult type in the React starter kit? I'm sure people who use the React version could use this as well.

@tnylea tnylea added the Approved Approved for merge label Apr 14, 2025
@JustSteveKing
Copy link
Author

Sure thing @tnylea

@JustSteveKing
Copy link
Author

React PR: laravel/react-starter-kit#99

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Approved for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants