Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsx memo break hooks in client side #3473

Open
codehz opened this issue Oct 1, 2024 · 1 comment
Open

jsx memo break hooks in client side #3473

codehz opened this issue Oct 1, 2024 · 1 comment
Labels

Comments

@codehz
Copy link
Contributor

codehz commented Oct 1, 2024

What version of Hono are you using?

4.6.3

What runtime/platform is your app running on?

Bun

What steps can reproduce the bug?

const Counter = memo(function Counter() {
  const [count, setCount] = useState(0);
  return (
    <div>
      <p>Count: {count}</p>
      <button onClick={() => setCount(count + 1)}>Increment</button>
    </div>
  );
});

What is the expected behavior?

the hook should keep working after memoization (to compatible with react) on client side

What do you see instead?

click increment not working, it seems the behavior is different between hono and react, is it expected?

Additional information

No response

@codehz codehz added the triage label Oct 1, 2024
@usualoma
Copy link
Member

usualoma commented Oct 1, 2024

Hi @codehz!

Thanks for the report. This is a bug, and we'll fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants