From 21f282425c751ee7926416642a0aded88d218623 Mon Sep 17 00:00:00 2001 From: Eliot Pontarelli <115111163+kolvian@users.noreply.github.com> Date: Fri, 14 Nov 2025 10:00:33 -0700 Subject: [PATCH] [compiler] Allow ref access in callbacks passed to event handler props (#35062) ## Summary Fixes #35040. The React compiler incorrectly flags ref access within event handlers as ref access at render time. For example, this code would fail to compile with error "Cannot access refs during render": ```tsx const onSubmit = async (data) => { const file = ref.current?.toFile(); // Incorrectly flagged as error };