Giter Site home page Giter Site logo

Comments (4)

github-actions avatar github-actions commented on May 22, 2024

由于缺乏足够的信息,我们暂时关闭了该 Issue。请修改(不要回复) Issue 提供最小重现以重新开启。谢谢。

from umi.

fz6m avatar fz6m commented on May 22, 2024

你是指从 umi 导入找不到 getDvaApp 吗,umi 4 有两个东西,一个是 umi ,不内置以前的各种插件了,如果想用 qiankun / dva 等功能需要手动添加插件。

另一个是 max ( @umijs/max ),内置了各种 umi 的插件。

如果你要用 umi ,并且想用 dva ,就需要手动配置,参考:使用插件

如果你用 max ,直接配置 dva: {} 开启即可。

注:dva 、use request 等属于上古数据流方案,为了兼容旧项目升级所以保留下来了,但已经很多年不更新了,现代数据流更推荐使用 jotai / valtio 管理全局状态,使用 react-query / swr 管理请求状态,而不再使用与 redux 相关的工具。

from umi.

zmm2tysu avatar zmm2tysu commented on May 22, 2024

注:使用 react-query / swr 管理请求状态,而不再使用与 redux 相关的工具。

请问这里的管理请求状态是啥意思?是指请求loading吗 @fz6m

from umi.

fz6m avatar fz6m commented on May 22, 2024

现代请求库帮你 管理了请求的 loading 态、避免竟态问题、失败自动重试、自动重新请求 等,不使用请求库项目的体验会很差,所以绝大多数项目都会使用请求库,比如 swr / react-query 。

from umi.

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.