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

Error: Refactoring The todo app #4020

Open
wickedwisdom0911 opened this issue Oct 7, 2022 · 2 comments
Open

Error: Refactoring The todo app #4020

wickedwisdom0911 opened this issue Oct 7, 2022 · 2 comments

Comments

@wickedwisdom0911
Copy link

This is what the event listener in the todo app looks like in fresh.js.

add.addEventListener("click", function() {
create(input.value);
save(input.value);
tick();
input.value = "";
});

Would like to refactor it like this , so that it looks readable

function add () {
create(input.value);
save(input.value);
tick();
input.value = "";
});

add.addEventListener("click", add);

@RUPAAK
Copy link

RUPAAK commented Oct 7, 2022

@wickedwisdom0911 I can take on this. May I ? Can you tell me the systematic process of creating a PR.

@RUPAAK RUPAAK mentioned this issue Oct 7, 2022
6 tasks
@wickedwisdom0911
Copy link
Author

wickedwisdom0911 commented Oct 8, 2022 via email

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