T
TanStack•2y ago
stormy-gold

What's the purpose of on[State]Change functions passed to the useReactTable() hook?

I can't wrap my head around this. In the docs it's said (https://tanstack.com/table/v8/docs/framework/react/guide/table-state#individual-controlled-state) that if we want to control a specific piece of table state, WE NEED TO BOTH pass in the corresponding state value and the on[State]Change function to the table instance. But, as I can see, if I pass in ONLY the state value to the table instance with NO on[State]Change function, or even an empty one, the table state is updated all the same. Thanks for your insights 🙂 Example:
Table State (React) Guide | TanStack Table Docs
Examples Want to skip to the implementation? Check out these examples:
No description
No description
No description
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?