Git Product home page Git Product logo

dva-admin's Introduction

dva-admin

熟悉 dva 框架、Redux、 Ant Design

核心概念

. State:一个对象,保存整个应用状态 . View:React 组件构成的视图层 . Action:一个对象,描述事件 . connect 方法:一个函数,绑定 State 到 View . dispatch 方法:一个函数,发送 Action 到 State

需要了解的

redux

Redux 入门教程

redux-thunk

改造store.dispatch,让 store.dispatch 可以接受函数作为参数。

redux-actions

异步操作的解决方案,让 Action Creator 返回一个 Promise 对象。

redux-actions

异步操作的解决方案,store.dispatch 函数接收一个 Promise 对象作为参数。

redux-thunk

改造store.dispatch,使得后者可以接受函数作为参数。

react-redux

  • 负责管理数据和业务逻辑,不负责 UI 的呈现
  • 带有内部状态
  • 使用 Redux 的 API

connect

connect 方法是一个高阶函数,自动生成容器组件,连接 model 和组件。

Provider

Provider 组件,可以让容器组件拿到 state

Redux-saga

使用 redux saga 进行异步操作。 redux-saga-in-chinese

dva-model-extend

扩展 dva�model

dva-model-extend

redux-saga

redux-saga

dva

Reducer

reducer 是一个函数,接受 stateaction,返回老的或新的 state ,即:

(state, action) => state

Effect

处理异步流程,底层引入了 redux-sagas

app.model({
  namespace: 'todos',
  effects: {
    *addRemote({ payload: todo }, { put, call }) {
      yield call(addTodo, todo);
      yield put({ type: 'add', payload: todo });
    },
  },
});

classnames

处理多个 className

JS 函数式编程指南

JS 函数式编程指南

dva-admin's People

Contributors

zxs-1024 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.