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

Todoアプリのリファクタリング #606

Closed
tabass opened this issue Dec 21, 2018 · 0 comments · Fixed by #620
Closed

Todoアプリのリファクタリング #606

tabass opened this issue Dec 21, 2018 · 0 comments · Fixed by #620
Assignees

Comments

@tabass
Copy link

tabass commented Dec 21, 2018

URL : https://github.com/asciidwango/js-primer/blob/master/source/use-case/todoapp/final/README.md

最終的なsrc/App.jsにて、handleAdd関数を定義しているのに、mount()内でこれを使っていないようです。

        formElement.addEventListener("submit", (event) => {
            event.preventDefault();
            this.todoListModel.addTodo(new TodoItemModel({
                title: inputElement.value,
                completed: false
            }));
            inputElement.value = "";
        });

の部分は、以下のようにすべきかと思います。

        formElement.addEventListener("submit", (event) => {
            event.preventDefault();
            this.handleAdd(inputElement.value);
            inputElement.value = "";
        });
@azu azu self-assigned this Dec 29, 2018
@azu azu mentioned this issue Dec 29, 2018
11 tasks
azu added a commit that referenced this issue Dec 30, 2018
この書籍の主題ではないので、できるだけコンパクトな方法を採用

- microsoft/TypeScript#24045
- google/closure-compiler#1781
- microsoft/TypeScript#24746

fix #606
@azu azu closed this as completed in #620 Dec 30, 2018
azu added a commit that referenced this issue Dec 30, 2018
* fix(todo): JSDocのdestructuringの記法を修正

この書籍の主題ではないので、できるだけコンパクトな方法を採用

- microsoft/TypeScript#24045
- google/closure-compiler#1781
- microsoft/TypeScript#24746

fix #606

* fix(todo): removeEventListerを削除

TODOアプリのユースケースでは解除まで行っていないので削除する

fix #607

* feat(todo): 残った課題を追加

* chore(todo): add comment

* fix(todo): add <!-- doctest:disable -->
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

Successfully merging a pull request may close this issue.

2 participants