This repository was archived by the owner on Jul 6, 2025. It is now read-only.
This repository was archived by the owner on Jul 6, 2025. It is now read-only.
Not importing aleph/react breaks the build #552
Open
Description
Steps to reproduce:
deno run -A -r https://alephjs.org/init.ts # choose "React"
cd my-app
rm routes/_app.tsx routes/_404.tsx routes/todos.tsx
deno task build && deno task start
Everything still fine. Now replace routes/index.tsx
with this:
import { useReducer } from 'react';
export default function Main() {
const [conversation, dispatch] = useReducer(s => s, 1);
return null;
}
deno task build && deno task start
Find this error in the browser:
Cannot read properties of null (reading 'useReducer')
The issue seems to be that we're no longer importing something from aleph/react
, I didn't dig further. As soon as something imports that module we're good again.
Initially I thought the issue was caused by removing _app.tsx
, but I think it comes down to the same cause as described above.
Metadata
Metadata
Assignees
Labels
No labels