use Route component and Route render in the same route

新手上路,请多包涵

image.png

this.routeTemp中的值是:
image.png
0:
$$typeof: Symbol(react.element)
key: "ru_30"
props:
component: ƒ Connect(props, context)
exact: true
path: "/StsManagement/DistrictQuestionManagement"
key: (...)
get key: ƒ ()
__proto__: Object
ref: null
type: ƒ Route()
_owner: null
_store: {validated: false}
_self: null
_source: null
__proto__: Object

<div>

                        {
                            this.routeTemp && [
                                <Route
                                    key={'ru1' + 1}
                                    path="/management"
                                    exact
                                    component={component || this.allRoutes[0].component}
                                    render={
                                        () => <Redirect to={selectMenu} />
                                    }
                                />, 
                                ...this.routeTemp
                            ]                           
                        }
                    </div>
                    
         
    ### 问题描述

问题出现的环境背景及自己尝试过哪些方法

相关代码

// 请把代码文本粘贴到下方(请勿用图片代替代码)

你期待的结果是什么?实际看到的错误信息又是什么?

阅读 779
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进