# useEntityPageContext

**Category:** Base Components/Pages/Entity Page/Hooks/useEntityPageContext

## API

### Overview

A React hook that retrieves [`EntityPageState`](./?path=/story/base-components-pages-entity-page-state--entitypagestate) from React context. Use it in any child component rendered within [`EntityPage`](./?path=/story/base-components-pages-entity-page--entitypage) to access the page state without prop-drilling.

```tsx
import { useEntityPageContext } from '@wix/patterns/page';
```

### Example

```tsx
function MyCardContent() {
  const state = useEntityPageContext();
  // Access state.entity, state.form, etc.
  return {state.entity?.name};
}
```

### Returns

[EntityPageState](./?path=/story/base-components-pages-entity-page-state--entitypagestate)

