Giter Site home page Giter Site logo

rxjs_mobx's Introduction

react Mobx框架封装应用,配合Rxjs

问题总结

1.mobx 框架导致componentDidUpdate生命周期nextProps跟this.props一致,无法区分,shouldComponentUpdate的netprops也同时因此失灵

2.changeState必须要调用this,由于封装的原因,延迟赋予了这个方法

###功能点 1.修复componentDidUpdate的前后两次props不一致问题,通过封装diapttch给每个oberval属性增加对应的prev属性 2.action内部的rxjs使用区分组件内部的new Subject使用

本地nginx

http { include mime.types; default_type application/octet-stream;

sendfile        on;
#tcp_nopush     on;

#keepalive_timeout  0;
keepalive_timeout  65;
gzip  on;
gzip_comp_level 6;
gzip_buffers     4 8k;
gzip_proxied any;
gzip_min_length  1024;
gzip_types text/plain text/css application/x-javascript application/javascript application/xml;


server {
    listen       80;
    server_name  weixiaoyi.com;

    location ^~ /api/  {
        proxy_pass http://127.0.0.1:3000;
    }

    location / {
       proxy_http_version 1.1;
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Connection "upgrade";
       proxy_set_header X-Real-IP $remote_addr;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       proxy_set_header Host $http_host;
       proxy_set_header X-NginX-Proxy true;

       proxy_pass http://127.0.0.1:8000;
       proxy_redirect off;
   }

} }

rxjs_mobx's People

Contributors

weixiaoyi avatar

Stargazers

 avatar

Watchers

 avatar  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.