Hwy is a fullstack web framework for driving a (p)react frontend with a Go backend. Includes end-to-end typesafety, file-based nested UI routing, and much more.
As incidentally reported by @jaymanmdev in #45, there seems to be a Deno-specific issue around whether it's required to mark parent JSX components as async if they have async children.
If you bootstrap a new Deno project, run npm i && deno task dev, then visit a route, you'll get a "Cannot convert object to primitive value" error.
The fix
Add async in front of the root fn defined in the object arg to renderRoot in your main server entry file.
As incidentally reported by @jaymanmdev in #45, there seems to be a Deno-specific issue around whether it's required to mark parent JSX components as async if they have async children.
If you bootstrap a new Deno project, run
npm i && deno task dev
, then visit a route, you'll get a "Cannot convert object to primitive value" error.The fix
Add
async
in front of theroot
fn defined in the object arg torenderRoot
in your main server entry file.Example
Broken (before)
Fixed (after)
Both of the above seem to work in Node, but not in Deno.
Will fix this in the
create-hwy
templater in next release.