Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconsolidate Paginated Data Tables into a single component (again) #133

Open
ejmg opened this issue Jul 15, 2024 · 1 comment
Open

Reconsolidate Paginated Data Tables into a single component (again) #133

ejmg opened this issue Jul 15, 2024 · 1 comment
Labels
client P-Low Low priority relative to all other tasks.

Comments

@ejmg
Copy link
Collaborator

ejmg commented Jul 15, 2024

Summary

For exact details that I will not litigate in this issue, the design choices of NextJS's App directory model clash with tanstack/query's approach to supporting server prefetching/SSR and React Suspense. Most notably is the inability to pass server functions (AKA, server "actions", a pattern supported by the react server model) to client components that then use that server action for data fetching (again, a legal pattern with react server components). These two incompatibilities, together, required me to write a series of wrapper components around paginated-data-table.tsx instead of simply passing these details to the table.

This is not the end of the world but it is hilariously redundant. By using a parameterized getter function (that is never passed but mutually used between server and client components), I might yet-again be able to use a single common paginated-data-table component as the client instantiated component (as opposed to all of the wrapper components for paginated-data-table.tsx). Now that they're no longer passed from the wrapping server component to client components, the existing getter functions are entirely superfluous now, anyway.

@ejmg ejmg added client P-Low Low priority relative to all other tasks. labels Jul 15, 2024
@ejmg
Copy link
Collaborator Author

ejmg commented Jul 15, 2024

Time is a flat circle #17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client P-Low Low priority relative to all other tasks.
Projects
Status: No status
Development

No branches or pull requests

1 participant