Code Monkey home page Code Monkey logo

Comments (3)

day-xue avatar day-xue commented on June 22, 2024

如果开启持久化 只用了一个model 在devtool 只看到这个model 其他model没有

from foca.

geekact avatar geekact commented on June 22, 2024

如果不放在缓存里可能有一些预期的错误

我目前没有遇到报错,能说说你的场景吗?

如果开启持久化 只用了一个model 在devtool 只看到这个model 其他model没有

是的,因为模型总是在组件中使用,如果你的路由组件有使用lazy import之类的方案,它就被webpack或者vite打包工具分割到不同的页面。所以路由组件不载入浏览器,模型就不会被发现。
而持久化的模型因为一开始就在入口被import了,所以自然就被注册了。

from foca.

geekact avatar geekact commented on June 22, 2024

v3版本开始,initialState会立即存入持久化

from foca.

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.