Giter Club home page Giter Club logo

Comments (7)

sorrycc avatar sorrycc commented on May 17, 2024

数据 connect 时或往下传 props 时处理地不对吧,自己 debug 定位下。

from dva.

bjwulin avatar bjwulin commented on May 17, 2024

我写成{organ && organ.title}就没有问题了,我在初始状态确实设定的{organ:{}},怎么回事undefined呢?从后台获取数据后,显示也正常。

from dva.

bjwulin avatar bjwulin commented on May 17, 2024

后来我在改为({organ={}})=>{}也就好了,只是不明白,为啥我在model设定初始状态值为{},connect后的组件里面organ是undefined。

from dva.

sorrycc avatar sorrycc commented on May 17, 2024

外面传 initialState 了没?

from dva.

bjwulin avatar bjwulin commented on May 17, 2024

外面没有传,我就通过connect 到Route的页面,Route页面里面的组件在用这个属性。

from dva.

nikogu avatar nikogu commented on May 17, 2024

@bjwulin ({ organ })( organ) 不一样哦,你贴个 jsfiddle.net 的例子吧

from dva.

WhatAKitty avatar WhatAKitty commented on May 17, 2024

@bjwulin 查一下reducers里面的set动作,还有就是selectors里面的数据删选,问题应该会在这两个方面上。

from dva.

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.