Issue using `useDeno` in 0.3.0
See original GitHub issueThrows:
TypeError: Cannot read property 'value' of undefined
at http://localhost:8080/_aleph/-/deno.land/x/aleph@v0.3.0-alpha.6/framework/react/hooks.js:88:28
at mountMemo (http://localhost:8080/_aleph/-/cdn.esm.sh/v15/react-dom@17.0.1/esnext/react-dom.development.js:12623:33)
at Object.useMemo (http://localhost:8080/_aleph/-/cdn.esm.sh/v15/react-dom@17.0.1/esnext/react-dom.development.js:12930:36)
at useMemo2 (http://localhost:8080/_aleph/-/cdn.esm.sh/v15/react@17.0.1/esnext/react.development.js:1104:35)
at useDeno (http://localhost:8080/_aleph/-/deno.land/x/aleph@v0.3.0-alpha.6/framework/react/hooks.js:54:12)
at App (http://localhost:8080/_aleph/app.a3093224d.js:21:5)
at renderWithHooks (http://localhost:8080/_aleph/-/cdn.esm.sh/v15/react-dom@17.0.1/esnext/react-dom.development.js:12007:32)
at mountIndeterminateComponent (http://localhost:8080/_aleph/-/cdn.esm.sh/v15/react-dom@17.0.1/esnext/react-dom.development.js:14188:29)
at beginWork (http://localhost:8080/_aleph/-/cdn.esm.sh/v15/react-dom@17.0.1/esnext/react-dom.development.js:14987:36)
at HTMLUnknownElement.callCallback2 (http://localhost:8080/_aleph/-/cdn.esm.sh/v15/react-dom@17.0.1/esnext/react-dom.development.js:4265:34)
Code to reproduce:
import type { ComponentType } from 'https://esm.sh/react@17.0.1'
import React from 'https://esm.sh/react@17.0.1'
import { useDeno } from 'https://deno.land/x/aleph@v0.3.0-alpha.6/mod.ts'
export default function App({ Page, pageProps }: { Page: ComponentType<any>, pageProps: any }) {
useDeno(() => {
console.log('Hi')
})
return (
<main>
<Page {...pageProps} />
</main>
)
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (10 by maintainers)
Top Results From Across the Web
BadResource error when file changes in watch mode #75
Using example in https://deno.com/examples/hello.js or any script. This error is produced by changing the file.
Read more >Writing a React SSR app in Deno - DEV Community
Use deno help to explore the commands on offer. We'll be using this command to run our React SSR app later on.
Read more >How to Render React SSR with Deno and Deno Deploy - Strapi
In this guide you will learn how to render server-side React components using Deno and then deploy them from the serverless Deno Deploy....
Read more >Concurrency in modern programming languages: TypeScript ...
Building a concurrent web server in TypeScript on Deno to compare concurrency performance with Rust, Go, JS, Kotlin, and Java.
Read more >now-deno - npm Package Health Analysis - Snyk
Community builder for using deno on the ZEIT Now platform For more ... 0.3.0 ... To use Deno's unstable mode you can specify...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m debugging and I found that SSR generated keys are inserted on server
globalThis
, but not on browserglobalThis
.@juanvillacortac yes, i also figured out, currently only use
useDeno
in page components will generate the ssr data, i will fix it ASAP. thanks