| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| expect(output.code).toContain('const count = 0') | ||
| expect(output.code).not.toContain('useState(0)') |
There was a problem hiding this comment.
The output looks like
import { jsxs as _jsxs } from "react/jsx-runtime";
export function App(t0) {
const { name } = t0;
const count = 0;
return /* @__PURE__ */ _jsxs("div", { children: [name, count] });
}
Sorry, something went wrong.
|
Next has something similar and the one in the react compiler isn't likely directly usable (as in it may not be "production ready" for some edge cases). The agents dug up some history:
Currently it:
|
Sorry, something went wrong.
In rsc environment, useState/useEffect/etc is a runtime error since they are undefined in react-server exports, so the transform would ideally surfaces the usage error during build time instead like https://nextjs.org/docs/messages/react-client-hook-in-server-component. Rsc plugin currently doesn't do anything (yet). |
Sorry, something went wrong.
| expect(output.code).toContain('react/jsx-runtime') | ||
| expect(output.code).not.toContain('react/compiler-runtime') | ||
| expect(output.code).toContain('const count = 0') | ||
| expect(output.code).not.toContain('useState(0)') |
There was a problem hiding this comment.
| expect(output.code).not.toContain('useState(0)') | |
| expect(output.code).not.toContain('useState') |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
Set outputMode=ssr option in React Compiler for server environments.
This has two problems:
I found the option so I thought to fix it but found the problems above so I'm opening this PR as draft to discuss about these problems.