GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead. · Issue #60588 · microsoft/TypeScript

'React' refers to a UMD global, but the current file is a module. Consider adding an import instead. #60588

New issue
Copy link
New issue
Copy link
Closed
#60615
Closed
'React' refers to a UMD global, but the current file is a module. Consider adding an import instead.#60588
#60615
Copy link
Assignees
iisaduan

Description

@imranbarbhuiya
Parbez (imranbarbhuiya)
opened on Nov 25, 2024
Issue body actions

🔎 Search Terms

Hi, from ts 5.7, I'm getting the same error as reported in #60132 but for jsx: react-native. Wheneven I use <></>, I get the above error

🕗 Version & Regression Information

  • This changed between versions 5.6 and 5.7

⏯ Playground Link

https://www.typescriptlang.org/play/?jsx=3&ts=5.7.2#code/JYWwDg9gTgLgBAbzgNWAUwO5wL5wGZQQhwDkUaAhgMYwC0AdhTMAG5okDcAUF2gB6RY+AK70awCPTgBhIpHpp6MABQBKBD3IxhUKQB4AfFzhw9qTAb0B6cxiMmz6O9dv3TVo9iA

💻 Code

import { View } from 'react-native';

export function Component(){

return <>
  <View></View>
  <View></View>
  </>
}

🙁 Actual behavior

The fragment shows an error

🙂 Expected behavior

This should work like ts 5.6 and shouldn't error

Additional information about the issue

No response

Reacted by LeongXianJun, David Jebing, Bardiamist, Leslie Owusu-Appiah and James Pyne

Activity

  1. Isabel Duan (iisaduan)
    self-assigned this
    on Nov 25, 2024
  2. mrlika commented on Nov 26, 2024

    @mrlika
    Andriy Lysnevych (mrlika)
    on Nov 26, 2024
    More actions

    The issue is reproducible with the latest Expo 52 default app and TypeScript 5.7:

    npx create-expo-app my-app
    cd my-app
    npx tsc
    

    The issue is not reproducible with Expo 51 and TypeScript 5.7:

    npx create-expo-app my-app --template default@51
    cd my-app
    npx tsc
    

    But on Expo Discord channel think that the issue is in the latest TypeScript because it is not reproducible with lower versions of TypeScript and latest Expo 52.

    Reacted by Martin Kapal
  3. Isabel Duan (iisaduan)
    closed this as completedin #60615on Nov 26, 2024
  4. microsoft
    locked as resolved and limited conversation to collaborators on Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @iisaduan
    Isabel Duan (iisaduan)

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.