Coder Social home page Coder Social logo

kiesun / chat-buy-react Goto Github PK

View Code? Open in Web Editor NEW
1.0K 1.0K 130.0 1.08 MB

Client for beginners to learn, built with React / Redux / Node

License: GNU General Public License v3.0

HTML 1.32% JavaScript 97.29% CSS 1.39%
express immutablejs react react-router redux socket-io

chat-buy-react's Issues

安装nodemon报错

image
我找了 在这个路径下面有这个文件不过查看这个文件之后是一个链接文件
image
怎么解决 卡在这里了

接单后顾客无法自动更改订单状态

// actions/chat.js 中的connectSocket函数

export function connectSocket() {
  return (dispatch, state) => {
    const orders = state()
      .get("user")
      .get("orders");
// ....
  }
}

这里只在调用了connectSocket函数时才去拿orders的数据,这个时候应该还没有从服务端拿到数据,所以这里的orders应该是空的,在监听getOrder事件时用的是这里的orders,导致不执行dispatch

 socket.on("getOrder", data => {
      console.log(orders.isEmpty()) // true
      if (!orders.isEmpty()) {
        dispatch(getOrderSuccess(data));
      }
    });

MongoDB connect failed

按步骤安装了 MongoDB,连接失败。是因为我这个端口被占用了吗?请指教一下,谢谢。

jietu20180104-162054

express4和koa2

其实这个只是选择问题,只是想问下选择express4的理由是?

Project registration meets problems

when I register i meet an error, it seems to be a problem with proxyable. I just modify port.
Proxy error: Could not proxy request /user/register from localhost:3000 to http://localhost:27017/. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNRESET).

npm run server

cmd : npm run server

alway show this messages
[nodemon] restarting due to changes..

English translation

Thanks ! It looks like very good.

It's possible to have an english translation of the client please ?

Thanks !

npm run start error

image

执行npm run start之后,提示一个不可忽视的遇见一个意外标记,地址指向是src/index.js16行的<AppContainer>

部分样式问题

1、聊天界面,文字过长的话,右侧的头像会扁
image

2、好像是对方联系还是订单页面点击返回之后的报错。

TypeError:无法读取未定义的属性'get' Chat.componentWillUnmount d:/Demo/react-demo/Chat-Buy-React/chat-buy-react/src/container/chat.jsx:50

上传了好几次图片都没有成功,只好放文字了。

讨论:components 中的组件不应该直接访问 redux 和 router

首先,这是一个很好的项目,但是有个点想和大家讨论一下:

就是 components 的组件应该只和渲染有关,不关心数据和路由。数据和路由应该由 containers 中的组件去做,这个项目中 containers 中的部分组件直接包了一层 components 中的组件就导出了,应该是不太合适的。有些 components 中的组件直接访问了 redux 和 router,感觉也不太合适。

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.