# Function useGetDashboardModel

useGetDashboardModel(...args): DashboardModelState

React hook that retrieves an existing dashboard model from the Sisense instance.

# Parameters

Parameter Type
...args [GetDashboardModelParams]

# Returns


Dashboard load state that contains the status of the execution, the result dashboard model, or the error if any

# Example

An example of retrieving an existing dashboard model from the Sisense instance and render its widgets with component DashboardWidget:

 const { dashboard, isLoading, isError } = useGetDashboardModel({
   dashboardOid: '6448665edac1920034bce7a8',
   includeWidgets: true,
 if (isLoading) {
   return <div>Loading...</div>;
 if (isError) {
   return <div>Error</div>;
 if (dashboard) {
   return (
       {`Dashboard Title - ${dashboard.title}`}
       {dashboard.widgets?.map((widget) => (
         <DashboardWidget key={widget.oid} widgetOid={widget.oid} dashboardOid={dashboard.oid} />
 return null;