Commit 7f75db19 by Tulip Li

git 和 redux

parent 75581aac
# learn `git rebase -i`
* `git rebase -i origin/develop` to `f` the extra commit
* `git rebase -i origin/develop` to `r` to rename the commit , **title** must describes what you do clearly, besides, write the **content** to describe the details if need.
* `git push -f` to update your branch on Gitlab
* If you don’t want to use vim (because it’s complicated), you can use Visual Studio to edit your interactive rebase by running the command: `git config --global core.editor "code --wait"` in your terminal.
* To pull new changes from `develop` branch you should do `git pull --rebase`.This will update your branch with `develop` without creating one of those weird `Merge` commits
* If you’re pairing on a branch with someone else, it’s not in your best interest to use this flag. Instead, you should do `git push --force-with-lease`. What this does it that it allows you to overwrite your history so long as the remote ref has not changed. This addresses the case where person A changes history locally, person B adds to the existing history of the remote branch, then person A overwrites the work of person B when they force push.
# learn redux
## Action
An action MUST
* be a plain JavaScript object
* have a `type` prorperty
An action MAY
* have an `error` property
* have a `payload` property
* have a `meta` property
An action MUST NOT include properties other than `type`, `payload`, `error` and `meta`.
## Reducer
## store
* you'll only have a single store in a Redux application. When you want to split your data handling logic, you'll use reducer composition instead of many stores.
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment