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
But, as I can see, if I pass in ONLY the
Thanks for your insights
Example:
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:



Examples
Want to skip to the implementation? Check out these examples:
Want to skip to the implementation? Check out these examples: