# useCreateView
`useCreateView` creates a new [`View`](https://ably.com/docs/ai-transport/api/javascript/core/client-session.md) over the same conversation tree as the session's default view, then subscribes to it the same way [`useView`](https://ably.com/docs/ai-transport/api/react/core/use-view.md) does. Each created view has its own branch selections and pagination state. The view is closed automatically on unmount or when the session reference changes.
Use this hook when you need two independent renderings of the same conversation, for example, a split-pane diff between two regenerate siblings, or a secondary panel that pages older history without affecting the main scroll position.
#### Javascript
```
import { useCreateView } from '@ably/ai-transport/react';
function Compare() {
const left = useCreateView({ limit: 30 });
const right = useCreateView({ limit: 30 });
return (
This hook must be used within a [`ClientSessionProvider`](https://ably.com/docs/ai-transport/api/react/core/providers.md#client-session-provider) unless `session` is supplied explicitly.
## Parameters
### Javascript
```
import { useCreateView } from '@ably/ai-transport/react';
function Compare({ messageId }: { messageId: string }) {
const leftView = useCreateView({ limit: 30 });
const rightView = useCreateView({ limit: 30 });
const leftBranch = leftView.branchSelection(messageId);
const rightBranch = rightView.branchSelection(messageId);
return (
leftView.selectSibling(messageId, i)}
/>
rightView.selectSibling(messageId, i)}
/>
);
}
```
## Related Topics
- [Providers](https://ably.com/docs/ai-transport/api/react/core/providers.md): API reference for the AI Transport React providers: ClientSessionProvider and the createSessionHooks factory.
- [useClientSession](https://ably.com/docs/ai-transport/api/react/core/use-client-session.md): Read a ClientSession from the nearest ClientSessionProvider in the AI Transport React integration.
- [useView](https://ably.com/docs/ai-transport/api/react/core/use-view.md): Subscribe to a paginated, branch-aware view of the AI Transport conversation tree from React.
- [useTree](https://ably.com/docs/ai-transport/api/react/core/use-tree.md): Stable structural query callbacks for the AI Transport conversation tree from React.
- [useAblyMessages](https://ably.com/docs/ai-transport/api/react/core/use-ably-messages.md): Subscribe to raw Ably InboundMessages on the AI Transport channel from React.
## Documentation Index
To discover additional Ably documentation:
1. Fetch [llms.txt](https://ably.com/llms.txt) for the canonical list of available pages.
2. Identify relevant URLs from that index.
3. Fetch target pages as needed.
Avoid using assumed or outdated documentation paths.