goatslacker / goatslacker/alt

Different documentations and guides make alt hard to pick up

Open
#689 1 comment 3 reactions 0 assignees View on GitHub
bug docs enhancement
Dominant language
JavaScript
Stars
3.4k
Forks
312
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.