A hook for working with all of the records (including their colors and cell values) in a particular table, view or query result. Automatically handles loading data and updating your component when the underlying data changes.
This hook re-renders when data concerning the records changes (specifically, when cell values change, the record color changes, and when records are added or removed) - that's useful, but can cause re-renders quite often, meaning useRecordIds or useRecordById could be more appropriate depending on your use case.
Under the hood, this hook creates a TableOrViewQueryResult if passed a table or view.
Pass a query result if you want direct access to it (e.g. for queryResult.getRecordById
).
Returns a list of records, or null if no model was passed in.