goatslacker / alt

Isomorphic flux implementation
http://alt.js.org/
3.45k stars 322 forks source link

Different documentations and guides make alt hard to pick up #689

Open Nimelrian opened 7 years ago

Nimelrian commented 7 years ago

So, we just started using alt instead of Redux for a new project.

Up till now we followed the Getting Started guide on the homepage, so we have for example

handleAddMachine(machine) {
  this.machines.push(machine);
}

Today I looked something up on the Github Repository and found that following the examples in the README.md I'd use this:

handleAddMachine(machine) {
  this.setState({
    machines: this.state.machines.concat(machine)
  });
}

I recognized the 2nd pattern from Redux, promoting immutability and using non-mutating operations. Which one is the officially recommended one?

Having different documentations and approaches is horrible for the user. Especially if (what I think it is) the recommended way using setState is hidden here in the repository and not on the homepage of the library.

diessica commented 7 years ago

I'd be happy to work on this.