{"id":16385418,"url":"https://github.com/aaaaash/typescript-react-redux-starter-kit","last_synced_at":"2025-03-23T04:31:23.638Z","repository":{"id":100795866,"uuid":"112177783","full_name":"Aaaaash/typescript-react-redux-starter-kit","owner":"Aaaaash","description":"🏅🎖🥇Typescript+React全家桶脚手架","archived":false,"fork":false,"pushed_at":"2018-02-07T07:05:35.000Z","size":191,"stargazers_count":21,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T18:54:34.010Z","etag":null,"topics":["docker","nginx","nodejs","react","redux-observable","typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aaaaash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-27T09:48:03.000Z","updated_at":"2019-09-23T02:56:20.000Z","dependencies_parsed_at":"2023-06-10T01:15:36.902Z","dependency_job_id":null,"html_url":"https://github.com/Aaaaash/typescript-react-redux-starter-kit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aaaaash%2Ftypescript-react-redux-starter-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aaaaash%2Ftypescript-react-redux-starter-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aaaaash%2Ftypescript-react-redux-starter-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aaaaash%2Ftypescript-react-redux-starter-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aaaaash","download_url":"https://codeload.github.com/Aaaaash/typescript-react-redux-starter-kit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245056889,"owners_count":20553855,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","nginx","nodejs","react","redux-observable","typescript"],"created_at":"2024-10-11T04:14:28.504Z","updated_at":"2025-03-23T04:31:23.619Z","avatar_url":"https://github.com/Aaaaash.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Features\n\n[![](https://badge.juejin.im/entry/5a28fce4f265da430b7b21d2/likes.svg?style=flat-square)](https://juejin.im/entry/5a28fce4f265da430b7b21d2/detail)\n\n### [Typescript](https://github.com/Microsoft/TypeScript)\n\n  强类型的JavaScript，提高编码、debug效率\n### [React](https://github.com/facebook/react)\n  facebook开源库，基于JSX语法创建组件\n### [Redux](https://github.com/reactjs/redux)\n  可预测状态容器，最流行的react状态管理方案\n### [Docker](https://www.docker.com/)\n  虚拟化容器，一键打包部署发布\n\n## Quick start\n1. `npm install -g typescript`\n\n2. `git clone git@github.com:SakuraAsh/about-life.git`\n3. `cd about-life`\n4. `yarn install \u0026\u0026 yarn start`\n\n### build\n1. `yarn run build`\n\n## Example\n\n### container\n```javascript\n\n/**\n * action.ts\n * */\n\nexport function someAction(name: string) {\n  return {\n    type: 'GET_SOME_DATA',\n    name,\n  }\n}\n\n/**\n * reducer.ts\n * */\nconst initialState = fromJS({\n  myInfo: {}\n});\n\nconst reducer: Reducer\u003cState\u003e =\n  (state: State = initialState, action: Action) =\u003e {\n  switch (action.type) {\n    case 'FETCH_USER_FULFILLED':\n      return state.set('myInfo', fromJS(action.data));\n    default:\n      return state;\n  }\n}\n\n/**\n * epic.ts\n * */\n\n// must be imported\nimport 'rxjs';\n\n\nconst pingEpic: Epic\u003cAction, LifeStore\u003e = (action$: ActionsObservable\u003cAction\u003e) =\u003e\n  action$.filter((action: Action) =\u003e action.type === 'PING')\n    .delay(1000)\n    .mapTo({ type: 'PONG' });\n\nconst fetchUserEpic: Epic\u003cAction, LifeStore\u003e = (action$: ActionsObservable\u003cAction\u003e) =\u003e\n  action$.ofType('GET_SOME_DATA')\n    .mergeMap((action: Action) =\u003e\n      ajax.getJSON(`https://api.github.com/users/${action.name}`)\n        .map(response =\u003e getSuccess(response))\n    );\n\nexport default combineEpics(\n  pingEpic,\n  fetchUserEpic\n);\n\n/*\n * index.tsx\n * */\n\ninterface Props {\n  asyncRequest: (name: string) =\u003e void;\n}\n\ninterface State {\n  requesting: boolean;\n}\n\nclass Auth extends PureComponent\u003cProps, State\u003e{\n  render(): ReactNode {\n    return (\u003cdiv\u003e\n      {/*your code*/}\n    \u003c/div\u003e);\n  }\n}\n\n// inject redux-ovservable epics\ninjectEpics('about', aboutEpics);\n\nconst mapStateToProps = (state: any) =\u003e {\n  return {\n    myInfo: state.about.myInfo,\n  }\n};\n\nconst mapDispatchToProps = (dispatch: any) =\u003e ({\n  asyncRequest: (name: string) =\u003e dispatch(someAction(name))\n});\n\nfunction mergePropss(stateProps: Object, dispatchProps: Object, ownProps: Object) {\n  return Object.assign({}, ownProps, stateProps, dispatchProps);\n}\n\nconst withReducer = injectReducer({ key: 'about', reducer });\nconst withConnect = connect(mapStateToProps, mapDispatchToProps, mergePropss);\n\nexport default compose(withReducer, withConnect)(About);\n\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaaaash%2Ftypescript-react-redux-starter-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaaaash%2Ftypescript-react-redux-starter-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaaaash%2Ftypescript-react-redux-starter-kit/lists"}