This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# REACT + REDUX | |
## TERMS | |
### Store & State | |
The state is the data, and the store is where it’s kept. | |
redux gives you a store, and lets you keep state in it, and get state out, and respond when the state changes. But that’s all it does. | |
react-redux lets you connect pieces of the state to React components. | |
### Reducer | |
It takes the current state, and an action, and returns the newState | |
Reducer Rule #1: Never return undefined from a reducer. | |
Reducer Rule #2: Reducers must be pure functions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup Github and Bitbucket on a Computer : | |
https://gist.github.com/rosswd/e1afd2b0b0d515517eac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First, you must get the previous commit sha, the one before the forced push: | |
## Hit through terminal | |
curl -u <username> https://api.github.com/repos/:owner/:repo/events | |
# Then you can create a branch from this sha: | |
## Hit through terminal | |
curl -u <github-username> -X POST -d '{"ref":"refs/heads/<new-branch-name>", "sha":"<sha-from-step-1>"}' https://api.github.com/repos/:owner/:repo/git/refs |