简体   繁体   English

React组件未呈现/未显示在浏览器上

[英]React components are not rendering/not showing up on browser

I have a react project with all the latest npm packages. 我有一个包含所有最新npm软件包的react项目。 Please check github link for package.json file 请检查github链接以获得package.json文件

I can see the bundle.js file created and my components on chrome developers tools, however I cannot see those components render on browser. 我可以在chrome开发人员工具上看到创建的bundle.js文件和组件,但是看不到这些组件在浏览器上呈现。

git repo git回购

Please refer to image below 请参考下图 在此处输入图片说明

React devtool tab React devtool选项卡

在此处输入图片说明

The problem was the way I was using react-router-dom. 问题是我使用react-router-dom的方式。 The updated version does the support the way we used to pass nested routes to a parent routes where it used to render. 更新的版本支持我们用来将嵌套路由传递到其用于渲染的父路由的方式。

If anyone have same issues then refer to this awesome example guide. 如果有人遇到相同的问题,请参阅此出色的示例指南。 react router 4 awesome example 反应路由器4很棒的例子

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM