├── .editorconfig ├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── .prettierrc ├── .size-limit.js ├── .travis.yml ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── book.json ├── code-of-conduct.md ├── configs └── tsconfig.base.json ├── docs ├── CNAME ├── README.md ├── SUMMARY.md ├── core │ ├── createApp.md │ ├── createEffect.md │ ├── createEvent.md │ ├── createReducer.md │ ├── epics.md │ └── modules.md ├── guides │ ├── cli.md │ ├── interop.md │ ├── lifecycle.md │ ├── react.md │ └── ssr.md └── modules │ ├── formbase.md │ ├── loaders.md │ ├── persist.md │ ├── select.md │ └── validate.md ├── examples ├── form-async-validation │ ├── .env │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── public │ │ ├── favicon.ico │ │ ├── index.html │ │ └── manifest.json │ ├── src │ │ ├── apps │ │ │ └── asyncForm.js │ │ ├── components │ │ │ ├── App.js │ │ │ ├── RenderCount.js │ │ │ ├── Spinner.js │ │ │ └── Styles.js │ │ ├── index.js │ │ ├── modules │ │ │ └── formSubmit.js │ │ └── utils │ │ │ └── wait.js │ └── yarn.lock └── todo-mvc │ ├── .env │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json │ ├── src │ ├── apps │ │ ├── todoApp.js │ │ └── todoSelectors.js │ ├── components │ │ ├── App.js │ │ ├── Footer.js │ │ ├── Header.js │ │ ├── List.js │ │ ├── ListItem.js │ │ ├── OverallFooter.js │ │ └── TodoApp.js │ ├── index.js │ └── modules │ │ ├── handlers.js │ │ └── todo.js │ └── yarn.lock ├── greenkeeper.json ├── lerna.json ├── package.json ├── packages ├── stapp-cli-tools │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── package-lock.json │ ├── package.json │ └── src │ │ ├── index-check.js │ │ ├── index-install.js │ │ ├── index-update.js │ │ ├── index.js │ │ ├── stapp-packages.json │ │ ├── tasks-install │ │ └── parseInput.js │ │ ├── tasks-update │ │ └── getPackages.js │ │ ├── tasks │ │ ├── checkExistingPackages.js │ │ ├── collectPeerDependencies.js │ │ ├── fetchInitialMeta.js │ │ └── installDependencies.js │ │ └── utils │ │ ├── filterSkipped.js │ │ ├── has.js │ │ ├── installationLog.js │ │ └── removeCaret.js ├── stapp-formbase │ ├── .babelrc │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── jest.config.json │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── constants.ts │ │ ├── events.ts │ │ ├── formBase.h.ts │ │ ├── formBase.spec.ts │ │ ├── formBase.ts │ │ ├── helpers.ts │ │ ├── index.ts │ │ ├── reducers.ts │ │ └── selectors.ts │ ├── tsconfig.json │ └── tslint.json ├── stapp-loaders │ ├── .babelrc │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── jest.config.json │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── loaders.h.ts │ │ ├── loaders.spec.ts │ │ └── loaders.ts │ ├── tsconfig.json │ └── tslint.json ├── stapp-persist │ ├── .babelrc │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── jest.config.json │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── constants.ts │ │ ├── global.d.ts │ │ ├── helpers.ts │ │ ├── index.ts │ │ ├── persist.h.ts │ │ ├── persist.spec.ts │ │ ├── persist.ts │ │ └── toAsync.ts │ ├── tsconfig.json │ └── tslint.json ├── stapp-react-hooks │ ├── .babelrc │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── jest.config.json │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── helpers │ │ │ └── constants.ts │ │ ├── index.ts │ │ ├── models │ │ │ └── global.d.ts │ │ └── use │ │ │ ├── use.spec.tsx │ │ │ ├── useApi.ts │ │ │ ├── useField.ts │ │ │ ├── useForm.ts │ │ │ └── useStapp.ts │ ├── tsconfig.json │ └── tslint.json ├── stapp-react │ ├── .babelrc │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── jest.config.json │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── binded │ │ │ ├── createApi.ts │ │ │ ├── createComponents.spec.tsx │ │ │ ├── createComponents.ts │ │ │ ├── createConsume.ts │ │ │ ├── createConsumer.spec.tsx │ │ │ ├── createConsumer.ts │ │ │ ├── createField.ts │ │ │ ├── createForm.spec.tsx │ │ │ └── createForm.ts │ │ ├── context │ │ │ ├── Api.ts │ │ │ ├── Consumer.ts │ │ │ ├── Context.spec.tsx │ │ │ ├── Field.ts │ │ │ ├── Form.ts │ │ │ ├── Provider.ts │ │ │ └── consume.ts │ │ ├── helpers │ │ │ ├── StappSubscription.ts │ │ │ ├── constants.ts │ │ │ ├── getDisplayName.ts │ │ │ ├── propTypes.ts │ │ │ ├── renderComponent.spec.tsx │ │ │ ├── renderComponent.ts │ │ │ ├── simpleMemoize.spec.ts │ │ │ ├── simpleMemoize.ts │ │ │ └── testApp.ts │ │ ├── index.ts │ │ ├── models │ │ │ ├── ConsumeHoc.ts │ │ │ ├── Form.ts │ │ │ ├── Props.ts │ │ │ └── global.d.ts │ │ └── shared │ │ │ └── StappContext.ts │ ├── testSetup.ts │ ├── tsconfig.json │ └── tslint.json ├── stapp-rxjs │ ├── .babelrc │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── jest.config.json │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── index.ts │ │ ├── observableConfig.spec.ts │ │ └── observableConfig.ts │ ├── tsconfig.json │ └── tslint.json ├── stapp-select │ ├── .babelrc │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── jest.config.json │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── select.h.ts │ │ ├── select.spec.ts │ │ └── select.ts │ ├── tsconfig.json │ └── tslint.json ├── stapp-validate │ ├── .babelrc │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── jest.config.json │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── constants.ts │ │ ├── events.ts │ │ ├── helpers.ts │ │ ├── index.ts │ │ ├── reducers.ts │ │ ├── selectors.ts │ │ ├── validate.h.ts │ │ ├── validate.spec.ts │ │ └── validate.ts │ ├── tsconfig.json │ └── tslint.json ├── stapp │ ├── .babelrc │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── jest.config.json │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── core │ │ │ ├── createApp │ │ │ │ ├── bindApi.ts │ │ │ │ ├── createApp.h.ts │ │ │ │ ├── createApp.spec.ts │ │ │ │ ├── createApp.ts │ │ │ │ ├── getReadyPromise.ts │ │ │ │ ├── getRootReducer.ts │ │ │ │ ├── getStore.ts │ │ │ │ └── setObservableConfig.ts │ │ │ ├── createEffect │ │ │ │ ├── createEffect.h.ts │ │ │ │ ├── createEffect.spec.ts │ │ │ │ └── createEffect.ts │ │ │ ├── createEpic │ │ │ │ ├── createEpic.spec.ts │ │ │ │ └── createEpic.ts │ │ │ ├── createEvent │ │ │ │ ├── createEvent.h.ts │ │ │ │ ├── createEvent.spec.ts │ │ │ │ └── createEvent.ts │ │ │ └── createReducer │ │ │ │ ├── createReducer.h.ts │ │ │ │ ├── createReducer.spec.ts │ │ │ │ └── createReducer.ts │ │ ├── events │ │ │ ├── dangerous.ts │ │ │ └── lifecycle.ts │ │ ├── helpers │ │ │ ├── combineEpics │ │ │ │ ├── combineEpics.spec.ts │ │ │ │ └── combineEpics.ts │ │ │ ├── combineReducers │ │ │ │ ├── combineReducers.spec.ts │ │ │ │ └── combineReducers.ts │ │ │ ├── constants.ts │ │ │ ├── controlledPromise │ │ │ │ ├── controlledPromise.spec.ts │ │ │ │ └── controlledPromise.ts │ │ │ ├── getEventType │ │ │ │ ├── getEventType.spec.ts │ │ │ │ └── getEventType.ts │ │ │ ├── has │ │ │ │ ├── has.spec.ts │ │ │ │ └── has.ts │ │ │ ├── identity │ │ │ │ ├── identity.spec.ts │ │ │ │ └── identity.ts │ │ │ ├── is │ │ │ │ ├── isArray │ │ │ │ │ ├── isArray.spec.ts │ │ │ │ │ └── isArray.ts │ │ │ │ ├── isEvent │ │ │ │ │ ├── isEvent.spec.ts │ │ │ │ │ └── isEvent.ts │ │ │ │ ├── isModule │ │ │ │ │ └── isModule.ts │ │ │ │ ├── isPromise │ │ │ │ │ └── isPromise.ts │ │ │ │ └── isSubscribable │ │ │ │ │ └── isSubscribable.ts │ │ │ ├── logError │ │ │ │ └── logError.ts │ │ │ ├── omit │ │ │ │ ├── omit.spec.ts │ │ │ │ └── omit.ts │ │ │ ├── pick │ │ │ │ ├── pick.spec.ts │ │ │ │ └── pick.ts │ │ │ ├── select │ │ │ │ ├── select.spec.ts │ │ │ │ └── select.ts │ │ │ ├── testHelpers │ │ │ │ ├── collectData │ │ │ │ │ └── collectData.ts │ │ │ │ ├── getInitialState │ │ │ │ │ ├── getInitialState.spec.ts │ │ │ │ │ └── getInitialState.ts │ │ │ │ ├── loggerModule │ │ │ │ │ └── loggerModule.ts │ │ │ │ └── wait │ │ │ │ │ └── wait.ts │ │ │ └── uniqueId │ │ │ │ ├── uniqify.ts │ │ │ │ ├── uniqueId.spec.ts │ │ │ │ └── uniqueId.ts │ │ ├── stapp.ts │ │ └── types │ │ │ └── omit.ts │ ├── tsconfig.json │ └── tslint.json └── template │ ├── .babelrc │ ├── .npmignore │ ├── LICENSE │ ├── README-TEMPLATE.md │ ├── README.md │ ├── jest.config.json │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── index.spec.ts │ └── index.ts │ ├── tsconfig.json │ └── tslint.json └── scripts ├── getPackages.js └── update.js /.editorconfig: -------------------------------------------------------------------------------- 1 | #root = true 2 | 3 | [*] 4 | indent_style = space 5 | end_of_line = lf 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | max_line_length = 100 10 | indent_size = 2 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | **Describe the bug** 8 | A clear and concise description of what the bug is. 9 | 10 | **To Reproduce** 11 | Steps to reproduce the behavior: 12 | 1. Go to '...' 13 | 2. Click on '....' 14 | 3. Scroll down to '....' 15 | 4. See error 16 | 17 | **Expected behavior** 18 | A clear and concise description of what you expected to happen. 19 | 20 | 21 | 22 | **Desktop (please complete the following information):** 23 | - OS: [e.g. iOS] 24 | - Browser [e.g. chrome, safari] 25 | - Version [e.g. 22] 26 | 27 | **Smartphone (please complete the following information):** 28 | - Device: [e.g. iPhone6] 29 | - OS: [e.g. iOS8.1] 30 | - Browser [e.g. stock browser, safari] 31 | - Version [e.g. 22] 32 | 33 | **Additional context** 34 | Add any other context about the problem here. 35 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | **Is your feature request related to a problem? Please describe.** 8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 9 | 10 | **Describe the solution you'd like** 11 | A clear and concise description of what you want to happen. 12 | 13 | **Describe alternatives you've considered** 14 | A clear and concise description of any alternative solutions or features you've considered. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Coverage 15 | lib-cov 16 | coverage 17 | .nyc_output 18 | 19 | # Dependency directories 20 | node_modules/ 21 | jspm_packages/ 22 | 23 | # IDE 24 | .DS_Store 25 | .vscode 26 | .idea 27 | 28 | # Compiled sources 29 | lib 30 | docs/_book 31 | _book 32 | .tempdocs 33 | compiled 34 | 35 | # Cache 36 | .awcache 37 | .rpt2_cache 38 | .npm 39 | 40 | # Private data 41 | .npmrc 42 | .coveralls.yml 43 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 80, 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "semi": false, 6 | "singleQuote": true, 7 | "trailingComma": "none", 8 | "bracketSpacing": true, 9 | "jsxBracketSameLine": false, 10 | "proseWrap": "never", 11 | "parser": "typescript", 12 | "arrowParens": "always" 13 | } 14 | -------------------------------------------------------------------------------- /.size-limit.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | { 3 | name: 'stapp core', 4 | path: './packages/stapp/lib/stapp.js' 5 | }, 6 | { 7 | name: 'stapp-formbase', 8 | path: './packages/stapp-formbase/lib/index.js' 9 | }, 10 | { 11 | name: 'stapp-loaders', 12 | path: './packages/stapp-loaders/lib/index.js' 13 | }, 14 | { 15 | name: 'stapp-validate', 16 | path: './packages/stapp-validate/lib/index.js' 17 | }, 18 | { 19 | name: 'stapp-persist', 20 | path: './packages/stapp-persist/lib/index.js' 21 | }, 22 | { 23 | name: 'stapp-react', 24 | path: './packages/stapp-react/lib/index.js' 25 | }, 26 | { 27 | name: 'stapp-react-hooks', 28 | path: './packages/stapp-react/lib/index.js' 29 | }, 30 | { 31 | name: 'stapp-select', 32 | path: './packages/stapp-select/lib/index.js' 33 | }, 34 | { 35 | name: 'Total', 36 | path: [ 37 | './packages/stapp/lib/stapp.js', 38 | './packages/stapp-formbase/lib/index.js', 39 | './packages/stapp-loaders/lib/index.js', 40 | './packages/stapp-validate/lib/index.js', 41 | './packages/stapp-persist/lib/index.js', 42 | './packages/stapp-react/lib/index.js', 43 | './packages/stapp-react-hooks/lib/index.js', 44 | './packages/stapp-select/lib/index.js' 45 | ] 46 | } 47 | ] 48 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | if: tag IS blank 2 | 3 | cache: 4 | yarn: true 5 | directories: 6 | - node_modules 7 | 8 | language: node_js 9 | node_js: 10 | - '10' 11 | - '8' 12 | - '6' 13 | 14 | script: 15 | - npm run build 16 | - npm run test:ci 17 | 18 | install: 19 | - npm install 20 | - lerna bootstrap 21 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | By contributing to Stapp, you agree to abide by the [code of conduct](https://github.com/TinkoffCreditSystems/stapp/blob/master/code-of-conduct.md). 4 | 5 | ## Instructions 6 | 7 | These steps will guide you through contributing to this project: 8 | 9 | - Fork the repo. 10 | - Checkout the `develop` branch. 11 | - Install dependencies with `npm run bootstrap` command. 12 | 13 | ```bash 14 | git clone https://github.com/TinkoffCreditSystems/stapp 15 | cd stapp 16 | npm install 17 | ``` 18 | - Create a new branch from the `develop` branch. 19 | - Make your changes. Make sure the commands `npm run build` and `npm run test` are passing. 20 | 21 | ## Updating README 22 | * `README.md` in the root is copied automatically from the `./docs/` directory, so if you plan to make changes, make them in the `./docs/README.md` file. 23 | 24 | ## Committing 25 | 26 | Please, commit changes with `npm run cz`. This command will run commitizen, which will protect you against commit message pain. You may also install commitizen globally and commit with `git cz`. 27 | 28 | You'll be asked about the changes scope. Please, select among the following: 29 | 30 | * `core` - any feature and tests changes related to the core `stapp` package 31 | * `validate` - same for `stapp-validate` package 32 | * `loaders` - same for `stapp-loaders` package 33 | * `formbase`- same for `stapp-formbase` package 34 | * `persist` - same for `stapp-persist` package 35 | * `react` - same for `stapp-react` package 36 | * `rxjs` - same for `stapp-rxjs` package 37 | * `select` - same for `stapp-select` package 38 | * `root` - changes related to the root of this project 39 | * use `all` or leave empty when your changes are related to every single package 40 | 41 | Finally send a GitHub Pull Request with a clear list of what you've done (read more [about pull requests](https://help.github.com/articles/about-pull-requests/)). Make sure all of your commits are atomic (one feature per commit). 42 | -------------------------------------------------------------------------------- /book.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": "./docs", 3 | "plugins": [ 4 | "-sharing", 5 | "my-toolbar" 6 | ], 7 | "pluginsConfig": { 8 | "my-toolbar": { 9 | "buttons": 10 | [ 11 | { 12 | "label": "GitHub", 13 | "text": " ", 14 | "icon": "fa fa-github", 15 | "url": "https://github.com/TinkoffCreditSystems/stapp/" 16 | }, 17 | { 18 | "label": "Share link on Facebook", 19 | "text": " ", 20 | "icon": "fa fa-facebook", 21 | "url": "http://www.facebook.com/sharer/sharer.php?s=100&p[url]={{url}}" 22 | }, 23 | { 24 | "label": "Share link on Twitter", 25 | "text": " ", 26 | "icon": "fa fa-twitter", 27 | "url": "http://twitter.com/share?text=Stapp:%20modular%20state%20and%20side-effects%20manager&url=https://stapp.js.org/&hashtags=stapp" 28 | }, 29 | { 30 | "label": "Edit this page on github", 31 | "text":"Edit this page", 32 | "icon": "fa fa-pencil-square-o", 33 | "position" : "left", 34 | "url": "https://github.com/TinkoffCreditSystems/stapp/blob/master/docs/{{filepath_lang}}" 35 | } 36 | ] 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /configs/tsconfig.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "moduleResolution": "node", 4 | "target": "es5", 5 | "module": "commonjs", 6 | "lib": ["es2015", "es2016", "es2017", "dom"], 7 | "strict": true, 8 | "strictFunctionTypes": false, 9 | "sourceMap": true, 10 | "declaration": true, 11 | "stripInternal": true, 12 | "allowSyntheticDefaultImports": true, 13 | "esModuleInterop": true, 14 | "noUnusedLocals": false, 15 | "noUnusedParameters": false, 16 | "skipLibCheck": true, 17 | "importHelpers": false, 18 | "jsx": "react" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | stapp.js.org 2 | -------------------------------------------------------------------------------- /docs/SUMMARY.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | ### Stapp 3 | * [Introduction](README.md) 4 | * [Installation](README.md#installation) 5 | * [Motivation](README.md#motivation) 6 | * [Core concepts](README.md#stapp-core-concepts) 7 | 8 | ### Core 9 | * [createApp](/core/createApp.md) 10 | * [createEvent](/core/createEvent.md) 11 | * [createEffect](/core/createEffect.md) 12 | * [createReducer](/core/createReducer.md) 13 | * [Modules](/core/modules.md) 14 | * [Epics](/core/epics.md) 15 | 16 | ### Guides 17 | * [React](/guides/react.md) 18 | * [SSR](/guides/ssr.md) 19 | * [RxJS and other reactive libs](/guides/interop.md) 20 | * [Application lifecycle](/guides/lifecycle.md) 21 | * [Stapp CLI](/guides/cli.md) 22 | 23 | ### Modules 24 | * [persist](/modules/persist.md) 25 | * [loaders](/modules/loaders.md) 26 | * [formbase](/modules/formbase.md) 27 | * [validate](/modules/validate.md) 28 | * [select](/modules/select.md) 29 | 30 | ### Links 31 | * [Issues](https://github.com/TinkoffCreditSystems/stapp/issues) 32 | * [Changelog](https://github.com/TinkoffCreditSystems/stapp/releases) 33 | -------------------------------------------------------------------------------- /docs/guides/lifecycle.md: -------------------------------------------------------------------------------- 1 | # Application lifecycle 2 | 3 | 4 | 5 | 6 | 7 | - [`init`](#init) 8 | - [`ready`](#ready) 9 | - [`disconnect`](#disconnect) 10 | 11 | 12 | 13 | Stapp applications have two major events in their lifecycle. 14 | 15 | ## `init` 16 | The initiation process starts when `createApp` is called. The completion of the process is indicated by the `initEvent`. 17 | 18 | ## `ready` 19 | `readyEvent` is emitted after the `ready` promise resolves. See [SSR section](/guides/SSR.html) for more info. 20 | 21 | ## `disconnect` 22 | The disconnection process starts when `Stapp.disconnect` is called. It starts with the `disconnectEvent`. 23 | After that the application disables all dispatch functions and unsubscribes from epics. 24 | Note, that currently the application can't be restarted after the disconnection process completes. 25 | -------------------------------------------------------------------------------- /examples/form-async-validation/.env: -------------------------------------------------------------------------------- 1 | SKIP_PREFLIGHT_CHECK=true 2 | -------------------------------------------------------------------------------- /examples/form-async-validation/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | package-lock.json 23 | -------------------------------------------------------------------------------- /examples/form-async-validation/README.md: -------------------------------------------------------------------------------- 1 | # Stapp • Form with async validation 2 | Various form validations made with Stapp. 3 | 4 | See live at the [codesandbox.io](https://codesandbox.io/s/github/TinkoffCreditSystems/stapp/tree/master/examples/form-async-validation). 5 | 6 | SStapp is an application state-management tool based on redux and RxJS with significantly reduced 7 | boilerplate. Main goal of Stapp is to provide an easy way to create simple, robust and reusable applications. 8 | 9 | Stapp comprises all the best practices and provides instruments to write understandable and predicable code. 10 | 11 | ## Resources 12 | 13 | - [Website](https://github.com/TinkoffCreditSystems/stapp) 14 | - [Documentation](https://tinkoffcreditsystems.github.io/stapp/) 15 | 16 | ### Support 17 | 18 | - [Github issues](https://github.com/TinkoffCreditSystems/stapp/issues) 19 | 20 | ## Implementation 21 | 22 | The example is intentionally made overcomplicated to show some best practices (overcomplication is not a best practice itself). 23 | 24 | ## Credit 25 | 26 | Created by [Dmitry Korolev](https://github.com/dmitry-korolev) 27 | -------------------------------------------------------------------------------- /examples/form-async-validation/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "form-async-validation", 3 | "version": "2.7.0-0", 4 | "private": true, 5 | "dependencies": { 6 | "fbjs": "^1.0.0", 7 | "light-observable": "^2.13.1", 8 | "prop-types": "^15.7.2", 9 | "react": "^16.8.6", 10 | "react-dom": "^16.8.6", 11 | "react-scripts": "^2.1.8", 12 | "redux": "^4.0.1", 13 | "reselect": "^4.0.0", 14 | "rxjs": "^6.4.0", 15 | "stapp": "^2.6.0", 16 | "stapp-formbase": "^2.6.0", 17 | "stapp-loaders": "^2.6.0", 18 | "stapp-persist": "^2.6.0", 19 | "stapp-react": "^2.6.0", 20 | "stapp-validate": "^2.6.0", 21 | "styled-components": "^4.2.0" 22 | }, 23 | "scripts": { 24 | "start": "react-scripts start", 25 | "build": "react-scripts build" 26 | }, 27 | "browserslist": [ 28 | ">0.2%", 29 | "not dead", 30 | "not ie <= 11", 31 | "not op_mini all" 32 | ], 33 | "devDependencies": { 34 | "dotenv": "^8.0.0", 35 | "eslint": "^5.16.0", 36 | "node-pre-gyp": "^0.13.0" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /examples/form-async-validation/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tinkoff/stapp/1d7001fbac032f73c95d4a1807fe87329decc099/examples/form-async-validation/public/favicon.ico -------------------------------------------------------------------------------- /examples/form-async-validation/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 11 | 12 | 13 | 22 |(_: any, payload: P) => payload
15 |
16 | /**
17 | * @private
18 | */
19 | export const mapObject = = {
7 | children?: (
8 | state: S,
9 | api: A,
10 | app: Stapp }>
14 | }
15 |
16 | export type ConsumerProps(epics: [Epic]): Epic
7 | export function combineEpics