Skip to content

Compat client templates can skip an eager parent prop exception after a render-phase update #2597

Closed

Description

@domgan-oai

Reproduction

Migrate this React TSX module in compatibility mode with the codemod. It also reproduces when authored with the corresponding Octane template.

import { useState } from 'react';

function label(ready: boolean) {
  if (!ready) throw new Error('unready');
  return 'ready';
}

function Child({ name }: { name: string }) {
  return <b>{name}</b>;
}

export function App() {
  const [ready, setReady] = useState(false);
  if (!ready) setReady(true);
  return <Child name={label(ready)} />;
}

Actual behavior

React 19.2.7 reports the unready render error on both client and server. Octane 0.17.0 and the current source compiler report the same error on the server. Their client output skips label(false) and mounts ready.

As a control, evaluating const name = label(ready) before returning <Child name={name} /> makes both Octane renderers report the error.

Expected behavior

React's render-phase update contract lets the parent finish evaluating its return expression before retrying, while keeping discarded child mounts from committing. Can Octane preserve an eager parent prop expression and any error it throws while retaining the existing child guard? Strong can continue to diagnose render-phase state updates.

Codex task · Host com-79386

Activity

  1. added
    bug
    agent-authored
    on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-authoredbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions