Add public component ref Var helper

HA
1d ago
+50-4

Closes #7848

Summary

  • Add rx.vars.ref() as a public helper for accessing registered component React refs.
  • Reuse Reflex's canonical ref-id sanitization.
  • Automatically include the required refs state import.
  • Add regression coverage and documentation.

Validation

  • 7 focused tests passed
  • Ruff check passed
  • Ruff format check passed
  • Pyright passed with 0 errors
  • git diff --check passed