TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

React Table is a “headless” UI library

257 pointsby cwackerfussover 5 years ago

22 comments

euoiaover 5 years ago
Every few months I look at the state of table libraries on the web. Of course, it&#x27;s great to have pagination, sorting, searching - these are the basics.<p>I have been impressed with jQuery DataTables. jQuery DataTables has a lot of features, including export to Excel. jQuery DataTables works with Vue without any issues so long as you never mutate the table data. Mutating table data in Vue can be accommodated, but requires watching for data changes in Vue and making calls to the DataTables API.<p>I have a few questions about this library. Can it detect rows being clicked on (and emit an event, for example)? Can the searching be customized (I may want to display numbers in a locale-specific format, but match even when the search doesn&#x27;t include the formatting)? Can sorting be customized (I may wish to the sorting for a field to depend on another, possibly hidden, field)?<p>What do people use in Vue-land for tables? Is there anything that approaches the feature set of jQuery DataTables?
评论 #21631645 未加载
评论 #21632308 未加载
评论 #21636803 未加载
评论 #21635544 未加载
评论 #21633186 未加载
评论 #21631662 未加载
评论 #21632794 未加载
评论 #21631768 未加载
评论 #21633007 未加载
评论 #21635087 未加载
评论 #21632189 未加载
评论 #21634300 未加载
georgewfraserover 5 years ago
I spent a ridiculous amount of time working on optimized table rendering in the early years of my company, and I came to a simple conclusion: if you want to display full-screen tables, with dense data, and scroll around fast, the only option is canvas. &quot;Virtualized&quot; HTML tables are always an order-of-magnitude slower, no matter how much effort you put into optimization.<p>The fundamental reason why you end up back at canvas is that if you are scrolling a full-screen table fast, even at 30 FPS you are going to have to rerender about half the table on each frame. So &quot;virtualized DOM&quot; doesn&#x27;t really work; it&#x27;s all about render speed. And canvas allows you to achieve unbeatable render speeds by specializing your drawing algorithm for your particular scenario.
评论 #21633185 未加载
评论 #21632907 未加载
评论 #21633193 未加载
评论 #21632778 未加载
评论 #21634708 未加载
评论 #21636402 未加载
outsidethepartyover 5 years ago
I&#x27;m very curious how do people feel about the &quot;headless component&quot; UI strategy? First came across the concept at a conference recently -- React Table was one of the key examples the speaker gave, in fact -- and I find the idea intriguing, but I&#x27;m not quite sure yet whether I want to subscribe to the newsletter.<p>Is it a useful way to separate look-and-feel concerns from functional concerns, or is it just another layer of indirection?
评论 #21634797 未加载
评论 #21634439 未加载
评论 #21634624 未加载
评论 #21633971 未加载
评论 #21635044 未加载
评论 #21636103 未加载
grumblestumbleover 5 years ago
I think the team behind this is somewhat trivializing this change by saying that a UI table library &quot;has no business being in charge of your UI&quot;. Is the expectation is that the following are all bespoke, easy-to-implement features that application teams should rewrite from scratch and maintain internally, and should not be considered when looking at a library to deal with rendering tabular data in an application?<p>* Support for virtualized rows&#x2F;columns * Support for fixed headers * Support for frozen columns * Support for resizable columns * Support for re-ordering columns * Dealing with page &#x2F; container resizing. * Support for context menus in the context of all of the above * Support for master&#x2F;detail views * Support for tree data<p>My take is that the inverse is true. Structure&#x2F;Pagination&#x2F;sorting&#x2F;filtering of data sets is pretty trivial and in most cases the out-of-the-box functionality that libs provide for these is insufficient and ends up being overwritten anyway. The above list is exactly what I&#x27;m looking to outsource when looking at a grid library.
评论 #21633056 未加载
burtonatorover 5 years ago
I&#x27;ve been using react-table in Polar since the beginning and it&#x27;s a great library.<p>We&#x27;re using it in the document and annotation views and it provides pagination, sorting, etc.<p>I&#x27;m a bit nervous about this 7.0 release <i>not</i> providing a basic table UI as that was one of the wins for us migrating.<p>For example, here&#x27;s a screenshot of the document repository:<p><a href="https:&#x2F;&#x2F;getpolarized.io&#x2F;#document-repository" rel="nofollow">https:&#x2F;&#x2F;getpolarized.io&#x2F;#document-repository</a><p>... which is sort of the main view. React table allows you to sort by progress, creation time, update time, etc.<p>We used the same react table code to build the annotation viewer:<p><a href="https:&#x2F;&#x2F;getpolarized.io&#x2F;#annotation-viewer" rel="nofollow">https:&#x2F;&#x2F;getpolarized.io&#x2F;#annotation-viewer</a><p>One big issue we had was with context menus and selecting multiple items.<p>This doesn&#x27;t come out of the box (of course) but I think platform-consistent multi-select is important so we had to implement all that functionality.<p>We&#x27;re still a way from a more clear cut API for managing this stuff on the web + desktop + mobile.<p>I REALLY wish I could have web technology transparently work on mobile!
评论 #21633659 未加载
scarejunbaover 5 years ago
I see. It&#x27;s the backing data and state handling plus hooks (in the normal sense rather than React sense) to allow you to draw your own table. Very interesting.<p>Naturally, I imagine someone will make basic-react-table or something so you don&#x27;t have to write the code to render the table. I appreciate that the bottom-most level of libraries is this customizable but frequently I don&#x27;t want to draw all that code.<p>Still, perhaps the right place for that code is examples rather than a library. Hmm.
评论 #21631728 未加载
iddanover 5 years ago
Pairs great with React Spreadsheet <a href="https:&#x2F;&#x2F;iddan.github.io&#x2F;react-spreadsheet&#x2F;" rel="nofollow">https:&#x2F;&#x2F;iddan.github.io&#x2F;react-spreadsheet&#x2F;</a>
评论 #21635051 未加载
quinkover 5 years ago
I have put together the Material-UI Table component and react-table v7 for a project. Apart from the Typescript for v7 being a bit insufficient (but easy to work around it, and possibly fixed by now), it was an absolutely pleasant experience.<p>It’s almost like react-table v7 and {insert UI component library here} are made for each other and it’s incredibly valuable, more so than the previous react-table.<p>Absolute kudos to the developer and I look forward to UI component libraries writing their table display components to target the semantics of react-table v7.<p>This has some real potential for any UI library to get first-class table functionality without sweating and needlessly repeating the implementation details.
评论 #21633591 未加载
proc0over 5 years ago
Hmmm this isn&#x27;t srictly true. It&#x27;s a React library after all, and React is the rendering &quot;engine&quot; here. Even their description says: &quot;Hooks for building lightweight, fast and extendable datagrids for React&quot;. Therefore React is taking care of rendering. I think what they really mean by &quot;It doesn&#x27;t render it for you&quot; is that you have to implement the rendering functions for the Table, which is more just like providing a UI plugin that has no &quot;default&quot; (but I&#x27;m even assuming React Table does have a simple default, so it&#x27;s basically just an extensible UI plugin).
评论 #21633146 未加载
latortugaover 5 years ago
Have used React Table in production and it&#x27;s a great, reliable library. Thanks Tanner!
评论 #21631849 未加载
simion314over 5 years ago
is there a library that can render a lot of data as performant as native GUIs tabes&#x2F;data-grids . In my experience just loading 1000 items at once it hangs in the browser native dom lay outing code, a good implementation won&#x27;t create a GUI widget of each item but only for the visible ones and some buffer ones to have faster scrolling. Pagination and loading as you scroll is a hack, an example scenario would be like you would want to create a simple CSV editor and you want to load 1000+ rows , have sort-able, hide-able , rearangeble columns (with a decent toolkit you would just drop a DataGrid component and set the data provider
评论 #21632743 未加载
评论 #21632537 未加载
评论 #21632577 未加载
addicted44over 5 years ago
The &quot;headless&quot; UI concepts promoted at this website feel to me like an attempt to shoehorn separation of templates and business logic which React has strongly resisted.<p>Any thoughts on whether this impression is right or wrong?
评论 #21633139 未加载
评论 #21633099 未加载
sbilsteinover 5 years ago
Formik does this for forms. It’s great.
评论 #21631889 未加载
dimglover 5 years ago
I was actually building this exact thing many years ago. In hindsight I probably should have made it into React Table.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;divmgl&#x2F;tabled.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;divmgl&#x2F;tabled.js</a>
评论 #21636451 未加载
rubyn00bieover 5 years ago
So... is this pretty much providing a &quot;headless&quot; gui like coca does (e.g. UITableView), and then gives you a delegate or something which you implement for styling it (e.g. UITableViewDelegate)?
bubbabover 5 years ago
React Table is soo good for making your own table library. The flexibility is insane, even in the previous version where you had render props + prop getters. I love the idea of headlessness in v7, although I&#x27;m kind of dreading the migration from v6 -&gt; v7 :)
mikhailtatskyover 5 years ago
List of almost all grid solutions <a href="https:&#x2F;&#x2F;github.com&#x2F;FancyGrid&#x2F;awesome-grid" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;FancyGrid&#x2F;awesome-grid</a>
veeralpatel979over 5 years ago
If you like React Table, you might like AG Grid: <a href="https:&#x2F;&#x2F;www.ag-grid.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.ag-grid.com&#x2F;</a>
评论 #21633209 未加载
hiccuphippoover 5 years ago
Fyi, the examples in codesandbox don&#x27;t work for me unless I remove the serviceWorker.unregister() line.
评论 #21631860 未加载
intellixover 5 years ago
Sounds like angular-cdk, which is just awesome in the angular world
fithisuxover 5 years ago
So a reimplementation of celtk or hoplon?
评论 #21633243 未加载
techsin101over 5 years ago
I use this and it&#x27;s not ideal, let&#x27;s just say that. Lot of edge cases that you have no way of fixing without messing with library code itself
评论 #21633622 未加载