# Deprecate `createLayoutSwitchAuto` (https://press.fumadocs.dev/changelog/2026-08-29-deprecate-layout-switch-auto)

### Deprecate `createLayoutSwitchAuto` [#deprecate-createlayoutswitchauto]

Write a `renderPage` function switching on `page.type` instead, plain code with the same result:

```tsx
renderPage: (props) => {
  if (props.page.type === "blog") return <BlogPage {...props} />;

  return <DocsPage {...props} />;
},
```