SolidJSS
SolidJSโ€ข3y agoโ€ข
15 replies
FjordWarden

Strange React not defined error

I've created the bare minimum solidjs + vite app with just and index.html and index.jsx page:

import { render } from "solid-js/web";

export function App() {
  return <h1>Hello</h1>;
}

render(() => <App/>, document.body);


<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <script type="module" src="./index.jsx"></script>
</head>
<body>
</body>
</html>

Yet I get this super weird error in the console for the line render(() => <App/>, document.body);: Uncaught ReferenceError: React is not defined
Was this page helpful?