Closed bartlomieju closed 2 years ago
Ah yes! Would love help / second eyes here. When I run frameworks/react-ssr-deno I get this:
TypeError: Cannot read properties of null (reading 'useState')
at t.useState (https://cdn.jsdelivr.net/npm/react/+esm:7:6230)
at Dashboard (file:///Users/stephensewell/Projects/steve/framework-weight/frameworks/react-ssr-deno/generated-components/components/dashboard.js:8:33)
at Aa (https://cdn.jsdelivr.net/npm/react-dom/server/+esm:25:24355)
at Ha (https://cdn.jsdelivr.net/npm/react-dom/server/+esm:25:25114)
at Ua (https://cdn.jsdelivr.net/npm/react-dom/server/+esm:25:27501)
at Za (https://cdn.jsdelivr.net/npm/react-dom/server/+esm:25:28474)
at Wa (https://cdn.jsdelivr.net/npm/react-dom/server/+esm:25:28338)
at Ua (https://cdn.jsdelivr.net/npm/react-dom/server/+esm:25:27631)
at Za (https://cdn.jsdelivr.net/npm/react-dom/server/+esm:25:28474)
at Ha (https://cdn.jsdelivr.net/npm/react-dom/server/+esm:25:25517)
For some reason, useState is not recognized as an export from https://esm.run/react
, even tho when I inspect the code there nothing looks off
You should be able to reproduce by following the below:
After cloning this repo, install dependencies:
npm install
Now you can start running the below scripts:
First, we must generate the component code for each framework via Mitosis.
cd apps/components
npm install
npm run build
cd frameworks/react-ssr-deno
deno task preview
and then open http://localhost:6015
Hi, in the React SSR bench there's:
What's the issue? How can we help to fix it?