Add null to the type argument of RefObject

Proprietary

Replaces React's RefObject<T> with RefObject<T | null>, since @types/react 19 no longer makes current nullable. Only edits a package still on @types/react 18 or earlier, as its lockfile resolves it or else as its range allows, since code written for 19 means current to be non-null. Leaves any, a type argument that already includes null or any, and MutableRefObject alone.

org.openrewrite.react.19.refobject-defaults
mod run . --recipe=org.openrewrite.react.19.refobject-defaults

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.