React Hooks break FCC tests?

I’m currently working on the calculator app and i’ve noticed that during tests the asynchronous nature of setState is causing errors for the tests. I believethe test believes the value of display is “5” when it should be “0” because the value hasn’t yet updated. Could this be right? Here is my project;

Hey there,

it’s hard to give you an answer,
because it seems you didn’t add the correct link to your project.

It also makes sense to have a look at the tests on Github.

1 Like

thats embarrassing. Thank you, this is the correct link. I will check the tests;

is it possible the use of reacthooks them selves is whats making the test break?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.