frejs / fre

:ghost: Tiny Concurrent UI library with Fiber.

Home Page:https://fre.deno.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

useState bug

yangzhaox opened this issue · comments

Hi @yisar,

When migrating from Preact to Fre, I discovered another issue which can be reproduced in the branch : state-bug.

Using VSCode, right click the index.html and select 'Open with Live Server'. Click 'finish' button, 'Click Me!' button appears right away. It should appear after 5 seconds.

I had a quick look, seems canBackHome state (line 14) is assigned the value of title state (line 8).

Best,
Yang

I temporarily fixed it in 2.3.4. But it reflects a new problem. I need to fix it in the next version. Thank you for your discovery.