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

Rather than using let to get the HTML elements, we should use "const" instead so that in the codebase no one can accidentally change the variables. #28

Open
rajneesh069 opened this issue Jan 1, 2024 · 2 comments
Assignees

Comments

@rajneesh069
Copy link
Contributor

rajneesh069 commented Jan 1, 2024

Before :
Screenshot 2024-01-01 095621

The let keyword can be replaced by "const" to ensure that variables don't get changed accidentally.

After :
image

I'd like to work on this issue if it gets approved.

@rajneesh069
Copy link
Contributor Author

We can do the same for other variables too. And by the way, can we migrate the project to React, because doing it using vanilla JS will make the rendering of components inefficient as the DOM needs to get painted with every little change in it, and it is highly un-optimized too!

@nisha-laur
Copy link
Contributor

@rajneesh069 For now , you can go ahead with using const instead of let . But the decision to migrate cannot be considered, as it involves rewriting the entire existing code, and potentially introducing new complexities and as this project is relatively small and the performance is acceptable with the current setup, sticking with vanilla JS might be a reasonable choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants