All Projects → Aaaaash → typescript-react-redux-starter-kit

Aaaaash / typescript-react-redux-starter-kit

Licence: MIT License
🏅🎖🥇Typescript+React全家桶脚手架

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to typescript-react-redux-starter-kit

React Redux Firebase
Redux bindings for Firebase. Includes React Hooks and Higher Order Components.
Stars: ✭ 2,492 (+11766.67%)
Mutual labels:  redux-observable
hot-redux-chassis
Modern React/Redux/RxJS application using all the latest and greatest stuff from the community 🔥
Stars: ✭ 20 (-4.76%)
Mutual labels:  redux-observable
spotify
Spotify - GraphiteJS
Stars: ✭ 22 (+4.76%)
Mutual labels:  redux-observable
Rex Tils
Type safe utils for redux actions, epics, effects, react/preact default props, various type guards and TypeScript utils, React util components
Stars: ✭ 245 (+1066.67%)
Mutual labels:  redux-observable
react-ts-sample
sample tech stack with react and typescript
Stars: ✭ 26 (+23.81%)
Mutual labels:  redux-observable
typed-actions
Type-safe redux-actions
Stars: ✭ 43 (+104.76%)
Mutual labels:  redux-observable
React Admin
基于antd、redux-observable、redux-thunk、react-router响应式SPA脚手架,后台管理系统demo. 权限管理,用户管理,菜单管理。无限级菜单,下拉树形选择框
Stars: ✭ 141 (+571.43%)
Mutual labels:  redux-observable
react-tools-for-better-angular-apps
Use React ecosystem for unified and top notch DX for angular developement
Stars: ✭ 30 (+42.86%)
Mutual labels:  redux-observable
ts-react-boilerplate
A very opinionated (React/TypeScript/Redux/etc) frontend boilerplate
Stars: ✭ 43 (+104.76%)
Mutual labels:  redux-observable
arcomage-hd
Web-based, free and open source, remastered 3D clone of 3DO/NWC's 2000 card game Arcomage. 13 languages. Desktop or mobile Android iOS. Online or offline PWA. Against AI or Multiplayer (w/o server). 🧝👾🃏 (ts+react+redux+rxjs, CSS-based anim, WebRTC)
Stars: ✭ 55 (+161.9%)
Mutual labels:  redux-observable
Rxjs Websockets
A very flexible and simple websocket library for rxjs
Stars: ✭ 248 (+1080.95%)
Mutual labels:  redux-observable
redux-tools
💪 Maintaining large Redux applications with ease.
Stars: ✭ 34 (+61.9%)
Mutual labels:  redux-observable
react-workshops
Online react workshops
Stars: ✭ 36 (+71.43%)
Mutual labels:  redux-observable
Stuhome
📱 An iOS client for https://bbs.uestc.edu.cn/ written in react-native, redux and redux-observable.
Stars: ✭ 241 (+1047.62%)
Mutual labels:  redux-observable
react-ssr-advanced-seed
🔮 React SSR Advanced Seed (Typescript + nestJS + React SSR + React Native + Docker)
Stars: ✭ 76 (+261.9%)
Mutual labels:  redux-observable
React Redux Observable Typescript Sample
A sample application for React + redux-observable + TypeScript
Stars: ✭ 147 (+600%)
Mutual labels:  redux-observable
mst-effect
💫 Designed to be used with MobX-State-Tree to create asynchronous actions using RxJS.
Stars: ✭ 19 (-9.52%)
Mutual labels:  redux-observable
react-redux-observables-boilerplate
Starter kit for React with Router, Redux, Observable + RxJS
Stars: ✭ 89 (+323.81%)
Mutual labels:  redux-observable
React-Redux-Enterprise
A React-Redux boilerplate for enterprise/large scaled web applications
Stars: ✭ 77 (+266.67%)
Mutual labels:  redux-observable
data-flow
frontend data flow explored in React
Stars: ✭ 19 (-9.52%)
Mutual labels:  redux-observable

Features

Typescript

强类型的JavaScript,提高编码、debug效率

React

facebook开源库,基于JSX语法创建组件

Redux

可预测状态容器,最流行的react状态管理方案

Docker

虚拟化容器,一键打包部署发布

Quick start

  1. npm install -g typescript

  2. git clone [email protected]:SakuraAsh/about-life.git

  3. cd about-life

  4. yarn install && yarn start

build

  1. yarn run build

Example

container

/**
 * action.ts
 * */

export function someAction(name: string) {
  return {
    type: 'GET_SOME_DATA',
    name,
  }
}

/**
 * reducer.ts
 * */
const initialState = fromJS({
  myInfo: {}
});

const reducer: Reducer<State> =
  (state: State = initialState, action: Action) => {
  switch (action.type) {
    case 'FETCH_USER_FULFILLED':
      return state.set('myInfo', fromJS(action.data));
    default:
      return state;
  }
}

/**
 * epic.ts
 * */

// must be imported
import 'rxjs';


const pingEpic: Epic<Action, LifeStore> = (action$: ActionsObservable<Action>) =>
  action$.filter((action: Action) => action.type === 'PING')
    .delay(1000)
    .mapTo({ type: 'PONG' });

const fetchUserEpic: Epic<Action, LifeStore> = (action$: ActionsObservable<Action>) =>
  action$.ofType('GET_SOME_DATA')
    .mergeMap((action: Action) =>
      ajax.getJSON(`https://api.github.com/users/${action.name}`)
        .map(response => getSuccess(response))
    );

export default combineEpics(
  pingEpic,
  fetchUserEpic
);

/*
 * index.tsx
 * */

interface Props {
  asyncRequest: (name: string) => void;
}

interface State {
  requesting: boolean;
}

class Auth extends PureComponent<Props, State>{
  render(): ReactNode {
    return (<div>
      {/*your code*/}
    </div>);
  }
}

// inject redux-ovservable epics
injectEpics('about', aboutEpics);

const mapStateToProps = (state: any) => {
  return {
    myInfo: state.about.myInfo,
  }
};

const mapDispatchToProps = (dispatch: any) => ({
  asyncRequest: (name: string) => dispatch(someAction(name))
});

function mergePropss(stateProps: Object, dispatchProps: Object, ownProps: Object) {
  return Object.assign({}, ownProps, stateProps, dispatchProps);
}

const withReducer = injectReducer({ key: 'about', reducer });
const withConnect = connect(mapStateToProps, mapDispatchToProps, mergePropss);

export default compose(withReducer, withConnect)(About);

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].