Run react imports codemod

This commit is contained in:
Eric Bailey
2026-03-11 11:32:43 -05:00
parent f5994af620
commit b410ba867f
128 changed files with 905 additions and 799 deletions
@@ -1,17 +1,17 @@
import React from 'react'
import {createRef, PureComponent} from 'react'
import {type ComponentType, type RefObject} from 'react'
import {requireNativeModule} from 'expo'
import {requireNativeViewManager} from 'expo-modules-core'
import {GifViewProps} from './GifView.types'
import {type GifViewProps} from './GifView.types'
const NativeModule = requireNativeModule('ExpoBlueskyGifView')
const NativeView: React.ComponentType<
GifViewProps & {ref: React.RefObject<any>}
> = requireNativeViewManager('ExpoBlueskyGifView')
const NativeView: ComponentType<GifViewProps & {ref: RefObject<any>}> =
requireNativeViewManager('ExpoBlueskyGifView')
export class GifView extends React.PureComponent<GifViewProps> {
export class GifView extends PureComponent<GifViewProps> {
// TODO native types, should all be the same as those in this class
private nativeRef: React.RefObject<any> = React.createRef()
private nativeRef: RefObject<any> = createRef()
constructor(props: GifViewProps | Readonly<GifViewProps>) {
super(props)
@@ -1,11 +1,11 @@
import * as React from 'react'
import {createRef, PureComponent} from 'react'
import {type RefObject} from 'react'
import {StyleSheet} from 'react-native'
import {GifViewProps} from './GifView.types'
import {type GifViewProps} from './GifView.types'
export class GifView extends React.PureComponent<GifViewProps> {
private readonly videoPlayerRef: React.RefObject<HTMLMediaElement> =
React.createRef()
export class GifView extends PureComponent<GifViewProps> {
private readonly videoPlayerRef: RefObject<HTMLMediaElement> = createRef()
private isLoaded = false
constructor(props: GifViewProps | Readonly<GifViewProps>) {