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

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

Open
Nimelrian opened this issue Oct 5, 2016 · 1 comment
Open

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

Nimelrian opened this issue Oct 5, 2016 · 1 comment

Comments

@Nimelrian
Copy link

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.

@Nimelrian Nimelrian changed the title Different documentations and guides make alt a horror to use Different documentations and guides make alt hard to pick up Oct 5, 2016
@diessica
Copy link

I'd be happy to work on this.

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

No branches or pull requests

3 participants