Returns a function that get the record representation, leveraging the recordRepresentation prop of the parent <Resource> component.

You can also use its component version: <RecordRepresentation>.


// in src/posts/PostBreadcrumbs.tsx
import * as React from 'react';
import { Breadcrumbs, Typography } from '@mui/material';
import { Link, useGetRecordRepresentation, useRecordContext, useResourceContext } from 'react-admin';

export const PostBreadcrumbs = () => {
    const record = useRecordContext();
    const resource = useResourceContext();
    const getRecordRepresentation = useGetRecordRepresentation(resource);
    return (
        <div role="presentation">
            <Breadcrumbs aria-label="breadcrumb">
                <Link underline="hover" color="inherit" to="/">
                <Link underline="hover" color="inherit" to="/posts">
                <Typography color="text.primary">

// in src/posts/PostEdit.tsx
import { EditBase, EditView, SimpleForm, TextInput } from 'react-admin';
import { PostBreadcrumbs } from './PostBreadcrumbs';

const PostEdit = () => (
        <PostBreadcrumbs />
                <TextInput source="title" />


Here are all the options you can set on the useGetRecordRepresentation hook:

Prop Required Type Default Description
resource Required string   The record’s resource


The record’s resource.