axeldelafosse / expo-next-monorepo-example

Create a universal React app using Expo and Next.js in a monorepo

Home Page:https://expo-next-monorepo-example.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Need to import `react`

nandorojo opened this issue · comments

I'm not totally sure why this is the case, but if you don't import React from 'react' in a JSX file, I'm seeing this error, even though we're on react 17.

Screen Shot 2021-10-24 at 12 19 31 PM

Weird, I haven't experienced this issue with Next.js 🤷‍♂️ But should be fixed with 150e28d + also added support for Expo to use automatic JSX runtime!

So odd, I'm getting this issue again in a new project. Cleared all my caches, .next, node modules, etc. And I have the exact babel configs of this repo.

image

Looks like it was fixed by adding all the monorepo subpackages to the next app's dependencies.