Giter VIP home page Giter VIP logo

Comments (1)

awmleer avatar awmleer commented on May 20, 2024

model在应用一启动就会立刻执行。但是我们通常项目里面,后端的接口都是要求要先登录。这样一来,model在应用一启动还没有登录的情况下发请求的话肯定会失败。
所以我的问题是,为什么不把model设计成在某个组件真正使用的时候才触发发请求的动作?

或者,有没有什么办法可以做到在满足某些前置条件的情况下才允许model执行?

hox 的设计思路就是全局状态的,如果希望把状态的作用域&生命周期和组件树进行关联的话,目前可以考虑用 reto

from hox.

Related Issues (20)

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.