0.0.39-alpha.63 • Published 4 years ago

@sample-stack/client-state v0.0.39-alpha.63

Weekly downloads
36
License
MIT
Repository
github
Last release
4 years ago

Client State Package

All client(cache) state management will be done in this package. It not includes Redux,Apollo Client, Redux-Epics or anything that is used for managing the state.

Redux npm package includes actions, action-types and reducers

  1. TypeScript and Redux: getting started
  2. TypeScript and Redux: async actions
  3. TypeScript and Redux: unit testing with Jest
  4. Integrating TypeScript and redux-thunk

What does it include:

1. exported reducers
2. exported actions
3. exported graphql queries
4. Typescript 2.0.0 => ES6
5. unit testing with jest

Purpose:

This package can be installable in front-end webserver to use the reducers and actions.

The goal is to make a isolated and reusable module that is self-contained. In order to avoid name conflicts, following rules need to be abide. 1. MUST export a function call reducer() 2. MUST export its action creators as functions 3. MUST have action types in the form @npm-module-or-app/ACTION_TYPE eg. @@sample-stack/INCREMENT_COUNTER 4. MUST have reducer in the form npm-module-or-app/reducer_name eg. @sample-stack/counter

What's not included

  • It does not have any client UI components such as React
  • It does not configure Redux Store

Useful commands:

npm run build       - build the library files
npm run test        - run tests once
npm run test:watch  - run tests in watchmode (Useful for development)

Files explained:

 src                         - directory is used for typescript code that is part of the project
    index.ts                 - Index file of the package. Consists of exported reducers and actions
    index.spec.ts            - Tests file for main
    actions                  - Contains Actions to transform the state tree
        index.ts             - References all the exported actions
    reducers                 - Contains reducers, pure function with (state, action) => state signature. 
        index.ts             - References all the exported reducers.
 package.json                - file is used to describe the library and packages that are required added under peer-dependencies section
 tsconfig.json               - configuration file for the library compilation
 webpack.config.js           - configuration file of the compilation automation process for the library
             
0.0.39-alpha.63

4 years ago

0.0.39-alpha.31

4 years ago

0.0.39-alpha.17

4 years ago

0.0.39-alpha.16

4 years ago

0.0.39-alpha.12

4 years ago

0.0.39

4 years ago

0.0.39-alpha.9

5 years ago

0.0.39-alpha.7

5 years ago

0.0.39-alpha.1

5 years ago

0.0.38-alpha.16

5 years ago

0.0.38-alpha.15

5 years ago

0.0.38-alpha.14

5 years ago

0.0.38-alpha.13

5 years ago

0.0.38

5 years ago

0.0.38-alpha.12

5 years ago

0.0.38-alpha.11

5 years ago

0.0.38-alpha.10

5 years ago

0.0.38-alpha.8

5 years ago

0.0.38-alpha.7

5 years ago

0.0.38-alpha.6

5 years ago

0.0.38-alpha.5

5 years ago

0.0.38-alpha.4

5 years ago

0.0.38-alpha.2

5 years ago

0.0.38-alpha.1

5 years ago

0.0.38-alpha.0

5 years ago

0.0.37-18

5 years ago

0.0.37-17

5 years ago

0.0.37-13

5 years ago

0.0.37-12

5 years ago

0.0.37-10

5 years ago

0.0.37-9

5 years ago

0.0.37-8

5 years ago

0.0.37-7

5 years ago

0.0.37-6

5 years ago

0.0.37-5

5 years ago