-
Notifications
You must be signed in to change notification settings - Fork 65
useGet
Kersom edited this page Aug 29, 2023
·
2 revisions
When using useGet evaluate the need to add error, refresh or isLoading state. For details page, for instance that would display an error message if the user changes an URL to a non valid resource.
const
{data: task, error, refresh}
= useGet<Task>(params.id ? pulpAPI`/tasks/${params.id}` : '');
if (error) return <AwxError error={error} handleRefresh={refresh} />;
if (!task) return <LoadingPage breadcrumbs tabs />;
PageFramework
PageHeader
PageLayout
PageDashboard
PageDashboardCarousel
PageDetails
PageForm
PageTable
PageTabs
PageToolbar
BulkActionDialog
BulkConfirmationDialog
EmptyState
PageCarousel
ReorderItems
useBreakPoint
useFrameworkTranslations
useInMemoryView
useIsMounted
useOpen
usePageNavigate
useSearchParams
useSelectDialog
useTableItems
useView
useWindowLocation
useDeleteRequest
useGet
useGetAllPagesAWX
useGetItem
useGetRequest
useOptions
usePatchRequest
usePostRequest