docs(react-table): add TanStack Table community parsers example / documentation #836
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Happy New Year! 🎉
First of all, I want to express my gratitude for nuqs—this library has been working wonderfully and has significantly cleaned up our codebase. As a way to give back to the community, I've added documentation specifically for TanStack Table parsers. I hope this contribution will be helpful for others who are integrating nuqs with their tables.
Summary of Changes
I've added documentation and examples for TanStack Table integrations, covering the following areas:
1. Column Filtering
TanStack Table manages column filters via the
columnFilters
state, an array of objects with the shape:Filters are stored in the URL as
columnId=value
, with the value serialized as JSON to support any valid JSON type.2. Sorting
TanStack Table handles sorting with the
sorting
state, an array of objects with the shape:Sorting is represented in the URL as
columnId:direction
(e.g.,columnId:asc
orcolumnId:desc
).3. Kitchen Sink Example
4. State Display Updates
table.getState()
, aligning it more closely with the library's expectations (previously, pagination was managed manually).Feedback Request
Folder Structure: I followed my best understanding of the existing structure when organizing the documentation files and example code, but I'm unsure if this aligns with the library's conventions. I would appreciate any feedback or suggestions for improvement.
Serialization Conventions: For sorting and filtering, I’ve used conventions like
columnId:direction
for sorting andcolumnId=value
for filtering. I’d love to hear your thoughts on whether these align with your vision or if there are alternative conventions you'd prefer.Thank you again for maintaining such an excellent library! I hope these additions are helpful to the community. Looking forward to your feedback!