Skip to content

Commit

Permalink
delete demo source, cleanup useless packages
Browse files Browse the repository at this point in the history
  • Loading branch information
hanzhixing committed Aug 6, 2021
1 parent 75df7a9 commit 8777ec3
Show file tree
Hide file tree
Showing 69 changed files with 12,614 additions and 16,947 deletions.
6 changes: 0 additions & 6 deletions .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@ const presets = [
];

const plugins = [
'@babel/plugin-syntax-dynamic-import',
[
'babel-plugin-transform-builtin-extend',
{globals: ['Error', 'Array'], approximate: true},
],
'babel-plugin-react-require',
'react-hot-loader/babel',
];

module.exports = {
Expand Down
11 changes: 6 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
module.exports = {
"env": {
"jest": true,
"node": true,
"browser": true,
},
"parser": "babel-eslint",
"extends": [
"eslint:recommended",
"airbnb",
"plugin:react/recommended",
],
"plugins": [
"react",
"jest",
],
"rules": {
"arrow-parens": ["error", "as-needed"],
"no-console": ["warn", {allow: ["warn", "error"]}],
"no-unused-vars": ["warn"],
"no-shadow": ["warn"],
"indent": ["error", 4, {"SwitchCase": 1}],
"object-curly-spacing": ["error", "never"],
"object-curly-newline": ["error", {"consistent": true}],
"import/no-unresolved": ["off"],
"import/prefer-default-export": ["off"],
"import/no-extraneous-dependencies": ["off"],
Expand All @@ -25,11 +30,7 @@ module.exports = {
"react/jsx-indent-props": ["error", 4],
"react/jsx-boolean-value": ["off"],
"react/no-array-index-key": ["off"],
"object-curly-spacing": ["error", "never"],
"object-curly-newline": ["error", {"consistent": true}],
"arrow-parens": ["error", "as-needed"],
"react/jsx-props-no-spreading": ["off"],
"jsx-a11y/control-has-associated-label": ["off"],
},
"globals": {
"ENV_PUBLIC_URL": "readonly",
Expand Down
11 changes: 0 additions & 11 deletions .postcssrc.js

This file was deleted.

3 changes: 0 additions & 3 deletions .prettierrc.js

This file was deleted.

5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ Allow you building react and redux based web apps with less pain, by removing th
------------------------------
```

* `dispatch`, `action`, `reducer`, `store` are concepts from the design of redux, you should never try to put these things in your UI layer.
* `action`s are about what happend, it's not about "what should be done", even if they were named in verbs.
* It is `reducer`s' job, that about "what should be done" and "how it should be done".
* The `container` files you put in the "containers" directory are not actual `container`s, they are just connecting logics, the actual `container`s created automatically by `connect(YourComponent)`, you can only see them in the browser's `Developer Tools`.
* It is `reducer`'s job, that about "what should be done" and "how it should be done".
* The `container` files you put in the "containers" directory are not actual `container`s, they are just connecting logics, actual `container`s are created automatically by `connect(YourComponent)`, you can only see them in the browser's `Developer Tools`.
* In most situations, you should try hard to prevent putting JSX codes in the `container` files. Because they are about the UI.
* `redux-thunk` changes the origin conceptual model of the `action`, by functions, and functions always about "what should be done", or "how it should be done".
* The `action` is not equal to action types. **`Action Type` + `Action Payload` = `Action Instance`**.
Expand Down
9 changes: 0 additions & 9 deletions demo/public/404.html

This file was deleted.

12 changes: 0 additions & 12 deletions demo/public/index.html

This file was deleted.

13 changes: 0 additions & 13 deletions demo/src/404.js

This file was deleted.

10 changes: 0 additions & 10 deletions demo/src/_theme.scss

This file was deleted.

7 changes: 0 additions & 7 deletions demo/src/actions/types.js

This file was deleted.

12 changes: 0 additions & 12 deletions demo/src/api/errors.js

This file was deleted.

111 changes: 0 additions & 111 deletions demo/src/api/index.js

This file was deleted.

6 changes: 0 additions & 6 deletions demo/src/components/App/GithubCat.svg

This file was deleted.

76 changes: 0 additions & 76 deletions demo/src/components/App/index.jsx

This file was deleted.

16 changes: 0 additions & 16 deletions demo/src/components/SimpleButtons/ClickLoading.jsx

This file was deleted.

19 changes: 0 additions & 19 deletions demo/src/components/SimpleButtons/ClickLoadingError.jsx

This file was deleted.

0 comments on commit 8777ec3

Please sign in to comment.