GithubHelp home page GithubHelp logo

kujiale / tacky Goto Github PK

View Code? Open in Web Editor NEW
38.0 38.0 5.0 1.84 MB

Enterprise-level front-end framework based on react

Home Page: https://kujiale.github.io/tacky/#/zh-cn/

License: MIT License

JavaScript 3.24% TypeScript 96.76%
frontend-framework react state-management

tacky's People

Contributors

dependabot[bot] avatar geoffgu avatar zhu-xiaoming avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

tacky's Issues

state persistence

temporary, don't have requirement

for example:

@state('localStorage', 2000)

$merge update

two different action maybe trigger the same view update, for performance, need to provide merge action api, these actions update state in one transcation

关于 tacky 的定位问题疑问

tacky 的状态管理和它的配套工具(dev-tools等)都是自研的,看 Readme 作者是想让它成为一个企业级应用框架,我理解需要做很多事消耗很多时间,而且方向也比较大。我个人觉得最好先定位为状态管理库,完善后再考虑整个企业级框架的东西。

first render need to render twice, have any better idea to solve the problem

componentDidMount() {
  this.unsubscribeHandler = store.subscribe(() => {
    this.refreshView();
  }, this.componentInstanceUid);
  /*
    * Trigger action on target component didMount is faster than subscribe listeners.
    * TACKY must fetch latest state manually to solve the problems above.
    */
  this.refreshView();
}

effect can return value for abort api call

@effect
async fetch() {
  let pendingRequest = API.call(); // promise
  this.$update({ isLoading: true });

  function autoRun() {
    const result = await pendingRequest;
    this.$update({ isLoading: false, result });
  }

  function abort() {
    pendingRequest.abort();
  }
  
  return {
    abort,
    autoRun,
  }
}

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.