You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<button onClick={() => setCounter(state=> state + 1)}>{counter}
);
}
export default Page;
When using esm.sh there is no way to specify 'use client' in the top of the module declaration to correctly render them in a SSR framework like Next.js (because it tries to render as a server component)
My top-level declaration looks like this in esm.sh
/* esm.sh - esbuild bundle([email protected]) es2022 production */
import si,{useState as ii}from"/stable/[email protected]/es2022/react.mjs";var Zs={exports:{}},i={};var n;function ri(){if(n)return i;n=1;var
The text was updated successfully, but these errors were encountered:
Considering I publish the next React client component to private registry and use locally hosted esm.sh
'use client'
import React, { useState } from 'react';
import AllComponents from './src/components/AllComponents';
const Page: React.FC = (props: any) => {
const [counter, setCounter] = useState(0)
return (
<button onClick={() => setCounter(state=> state + 1)}>{counter}
}
export default Page;
When using esm.sh there is no way to specify 'use client' in the top of the module declaration to correctly render them in a SSR framework like Next.js (because it tries to render as a server component)
My top-level declaration looks like this in esm.sh
/* esm.sh - esbuild bundle([email protected]) es2022 production */
import si,{useState as ii}from"/stable/[email protected]/es2022/react.mjs";var Zs={exports:{}},i={};var n;function ri(){if(n)return i;n=1;var
The text was updated successfully, but these errors were encountered: