-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
Something got broken in 1.8.1 or 1.8.0 #79
Comments
How about 1.8.3 |
All versions after Here's another simpler example: https://codesandbox.io/s/fre-demo-uxuic This one starts to break with version Watch: All of a sudden, it's like the scheduler stops accepting new tasks or something? If you look in the console, you can see event handlers are still firing - it's the calls to the Could be related to this maybe? |
This looks like 1.8.0 is wrong, in version 1.8.3 I removed const component = useMemo(() => new Component(props)); |
Okay, we still have missing tests for That might explain the problem with the first example. But according to useMemo docs:
That's not what I want in the first example - I'm passing And the second example? The error is periodic, as you can see in the GIF - so probably has something to do with the scheduler? Might be two separate problems. Gotta get the rest of the tests in place... |
I'm sorry, your code is correct, I just debugged it, this is indeed my fault, I will fix it as soon as possible, thanks! |
Okay, cool - I'll try to get the missing coverage for hooks today, so we can make sure this stuff doesn't break again 🙂 |
It seems that I have fixed this bug, and then it should be #80 |
Can you give me an example with sandbox? the test I am not sure weather it is correct. |
In fact, the bug here has nothing to do with useeffect, but all my debugging results are the same as react. I need an example to show the difference between react and fre, not the document or the test ,Thank you very much |
Let me explain again. I'm not sure whether the test case is correct or not, but I won't say it's wrong. I have to get an example that can be debugged, or I will maintain the status quo. If the example proves my mistake, it's not difficult to fix it, please forgive me. |
That's what the tests are for 😉 I guess from the HTML files in the When you run the tests under |
With your last commit, I can confirm that my sandbox example is now working correctly! It took me a while to figure out why the test is passing with your change - it looks wrong, but now I see the error in my test! PR on the way! 😁 |
For the record, the weird problem I showed above where the scheduler seemed to die - this also no longer seems to occur, so these were probably related. 👍 |
I published v1.8.5👏 |
Here's a little experiment I've been working on:
https://codesandbox.io/s/fre-demo-iefch
I wanted to see if it was possible to implement React's class-based
Component
API using hooks.This was working fine until release
1.8.1
- so the last release that worked for me was1.8.0
.Try changing the dependency version from
1.8.0
to1.8.1
in the sandbox, and all the calls tosetState
for some reason stops working. 😶I suspected this had something to do with my recent change inlining the setter-function - but I've tried reverting that change, and it still doesn't work, so that's not why.
Here's a diff between 1.8.0 and 1.8.1.
Can you spot the problem in these changes?
Whatever it is, it's obviously not covered by tests yet...
The text was updated successfully, but these errors were encountered: