Skip to content

valtio not working #206

@aretrace

Description

@aretrace

What version of HonoX are you using?

0.1.23

What steps can reproduce the bug?

  1. select x-basic template
  2. transition app from hono/jsx to @hono/react-renderer
  3. install valtio: npm i valtio
  4. replace counter island do with valtio counter:
import { proxy, useSnapshot } from "valtio";

const state = proxy({ count: 0 });

export default function Counter() {
  const snap = useSnapshot(state);
  return (
    <div>
      <p>{snap.count}</p>
      <button onClick={() => ++state.count}>Increment</button>
    </div>
  );
}
  1. npm run dev

What is the expected behavior?

a basic incremental counter demo rendering and working

What do you see instead?

module is not defined
at eval (/.../node_modules/use-sync-external-store/shim/index.js:8:3)
at instantiateModule (file:///.../node_modules/vite/dist/node/chunks/dep-D8YhmIY-.js:53453:11

[vite] Error when evaluating SSR module /node_modules/use-sync-external-store/shim/index.js:
|- ReferenceError: module is not defined

Additional information

valtio: https://valtio.pmnd.rs

valtio-signal seems to be working, jotai test counter also works

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions