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

Fixed: React lint warnings #660

Merged
merged 7 commits into from
Dec 19, 2023
Merged

Fixed: React lint warnings #660

merged 7 commits into from
Dec 19, 2023

Conversation

drikusroor
Copy link
Contributor

@drikusroor drikusroor commented Dec 13, 2023

This PR intends to resolve the React warnings as described in #598

@BeritJanssen the remaining linting errors are all react-hooks/exhaustive-deps, e.g. "missing" or "incorrect" dependencies. Now, eslint proposes fixes here, but I'm not completely aware of what happens and should happen exactly so I'm afraid to break stuff, and I don't want to risk that over some linting warnings. Perhaps you can look into these or we can look at them together in the future?

@BeritJanssen
Copy link
Collaborator

Thanks for configuring the linter. I think that indeed we should review the missing dependencies for the hooks manually. #648 should fix some of those warnings already.

Copy link
Collaborator

@BeritJanssen BeritJanssen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can merge some of these adjustments by the linter already, and take care of the missing / incorrect dependencies in the react hooks later. Perhaps as a team we should review our linter settings, since I'm not sure everyone has one configured.

But please undo the change removing finalizeSession from API.js and Final.js. Indeed, I see that finalize() is never called, while it should probably be placed into the useEffect hook as a cleanup function.

@drikusroor drikusroor force-pushed the fix/react-warnings-598 branch from 5eb9553 to d29bcee Compare December 19, 2023 10:03
@drikusroor drikusroor marked this pull request as ready for review December 19, 2023 11:01
@drikusroor drikusroor changed the title Draft: Fixed: React lint warnings Fixed: React lint warnings Dec 19, 2023
@drikusroor
Copy link
Contributor Author

I think we can merge some of these adjustments by the linter already, and take care of the missing / incorrect dependencies in the react hooks later. Perhaps as a team we should review our linter settings, since I'm not sure everyone has one configured.

But please undo the change removing finalizeSession from API.js and Final.js. Indeed, I see that finalize() is never called, while it should probably be placed into the useEffect hook as a cleanup function.

I've looked it up and you have updated the call to finalize on June 20 here and made the div into a a element: 1cc4ac4#diff-dd2727c4ba071122a678bb23e7b9b2833fd33ab5995321f1df7d3dc4f4523d33

I think then it got removed after merging develop into a feature branch while resolving conflicts and so on:

1cc4ac4#diff-dd2727c4ba071122a678bb23e7b9b2833fd33ab5995321f1df7d3dc4f4523d33

Apart from that, I don't know if it ever behaved like it should have? I can imagine when you click a link that also has a onClick handler, race conditions might cause the onClick never to get executed or finished as it already navigates towards a new page.

@drikusroor
Copy link
Contributor Author

drikusroor commented Dec 19, 2023

I will merge this and I've addressed the finalize session not being called as a seperate issue in #676 !

@drikusroor drikusroor merged commit a161212 into develop Dec 19, 2023
6 checks passed
@drikusroor drikusroor deleted the fix/react-warnings-598 branch December 26, 2023 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants