Build a JavaScript Calculator

I have just completed the JavaScript Calculator project in the front end development course.

I had some issues with the test suit not working with some of completion tests, but after some hours of trying to figure it out and some google searches I found a post on the FreeCodeCamp GitHub page about the issue and problems with react 18 and the test suit for some of the Front end projects.

If possible I think it would be very helpful to have a note about the problem on the pages of the affected project, so that people can check if this is the problem they are running into if the are having issues.

I am rely enjoying FreeCodeCamp so far and rely appreciate that this kind of recourse is available and hope to be able to contribute to it when my skill level is a bit higher. :slight_smile:


1 Like

Was there a specific issue with the calculator and react 18? If there is an issue, you should post a link to a codepen with the problem.

The big change in react 17 to 18 was in the batching of updates which affected the 25+5 clock, but I don’t think there would be an issue with the calculator. I just tested my working calculator from react 16 with react 18 and it worked without changes (except for the rendering call). Most of the issue with react 18 and the 25+5 clock has been fixed.

Sure, her is the link:

Just like you the only thing I had to do was to change the render call and then it worked. So that is way I thought it could be a good ide to put a note at the bottom of the project so that people know that’s something they can try if the are having problems with getting there calculator to pass the tests.

For me it was test: 9, 12, 13 and 14 that did not pass.

Looks like the tests pass now so that’s good. Did you have to make some react 18 specific change to some older code that worked with react versions before 18?

As far as the change in rendering, that’s a react thing and not a fCC thing. You don’t even have to do the project with react and the changes from react 17 to 18 on how to render are very well documented by react. Keeping up with breaking changes like this is the developer’s responsibility.

No I did not have to make any other changes than the render call.