Sign in
Log inSign up
Sai Kishore Komanduri

18 likes

·

81 reads

7 comments

Andrew Wooldridge
Andrew Wooldridge
Sep 30, 2016

Hi, great article! When you get part two can you edit this article to link to it?

3
·
·3 replies
Denny Trebbin
Denny Trebbin
Sep 30, 2016

It's linked from the part 2

1
·
Andrew Wooldridge
Andrew Wooldridge
Sep 30, 2016

the circle is complete :)

1
·
Sai Kishore Komanduri
Sai Kishore Komanduri
Author
·Oct 1, 2016

I have updated the story with a link, @triptych. Thanks, @fibric :)

1
·
Chaim Lev-Ari
Chaim Lev-Ari
Oct 16, 2016

Thanks for another great tutorial, hopefully I'll be able to use what I learned soon in a real app :) A few comments/questions.

  1. You said there's no need to change the singleTodo file, but I think you do need to, in the bindings of the functions, Let's take for example the removeTodo method: you need to change from just a regular binding (onClick={this.removeTodo}) to something like (onClick={() => this.removeTodo(todoId)}. Worked for me only after the change.
  2. My visibility filter isn't working. I think it's because the render function of the todoApp isn't called again and thus the required changed aren't happening. How would you fix that?

Thanks again!

2
·
·2 replies
Sai Kishore Komanduri
Sai Kishore Komanduri
Author
·Oct 16, 2016

Thanks for your ever kind words, @chiptus! :)

  1. You’re right, if you’re coming straight from the ES6+React getting started tutorial, the change you describe is needed. I've refactored the code in the original ES6+React example (check it out here), and it is in this context, I said you don’t need any change. Thanks for noticing this, I'll update the ES6+React tutorial soon.

  2. I’m afraid I don’t exactly follow the cause of your bug; if you could let me peek into your code/repo, I would be better able to figure out the root of the problem. Alternatively, here is the repo ('redux' branch) with everything perfectly working. Maybe you can compare your version to it, and figure out what the problem is?

Hope this helps! :)

1
·
Marcin Pawłowski
Marcin Pawłowski
Feb 15, 2017

Hello, I'm struggling with choose redux and mobx and for now I'm reading your article. IMO there is a bug in your example code:

case actionTypes.COMPLETE_TODO: return state.map(todo => { if (todo.id === action.todoId) { return Object.assign({}, todo, {isDone: !todo.isDone}) } return todo });

This action could mark ToDo item as not completed as well. Action type should be called "Toggle" or explicit use "true": {isDone:true}

1
·