react-book-examples icon indicating copy to clipboard operation
react-book-examples copied to clipboard

大神,我写到了250页,看不到你效果图上`loading`.

Open jiexishede opened this issue 8 years ago • 3 comments

http://stackoverflow.com/questions/42749353/actions-may-not-have-an-undefined-type-property-have-you-misspelled-a-constan

问题在哪啊?

jiexishede avatar Mar 12 '17 22:03 jiexishede

** 改动 代码 ** ,变成这个样子.

loading 依然,没有加载出来啊.

P 标签,

loading

没有展示出来.

 case LOAD_ARTICLES: {
      return {
        ...state,
        loading: true,
        error: false,
      };
    }

    case LOAD_ARTICLES_SUCCESS: {
      return {
        ...state,
        loading: true,
        error: false,
        articleList: action.payload,
      };
    }

    case LOAD_ARTICLES_ERROR: {
      return {
        ...state,
        loading: false,
        error: true,
      };
    }

    default:
      return state;
  }



jiexishede avatar Mar 12 '17 23:03 jiexishede

image

没有 loadingerror 啊,大神.

jiexishede avatar Mar 12 '17 23:03 jiexishede

@connect(state => {
  return {
    articleList: state.home.list.articleList,
    loading: state.home.list.loading,
    error: state.home.list.error,
  };
}, {
  push,
  ...actions,
})

加上这两个就好了.

    loading: state.home.list.loading,
    error: state.home.list.error,

jiexishede avatar Mar 13 '17 06:03 jiexishede