admin管理员组文章数量:1279242
I am working on my project, and the frontend is built on React.
The issue that I am facing is with a specific page (component). While I open the project in dev env via VScode the page works as expected (rendering post of the user/user profile image), however if I deploy the page, it will not return the post at all, only a broken profile image. Console log shows the post data as undefined. It happens only on the deployed version. Issue cannot be run build because I have added other components to app after the Post, and those are working as well.
Add console logs and the object will not return the data like post.id, post_image etc. It works fine on localhost so I was thinking if it might be some issue with how Heroku deploys the page. The react dev tool show the affected component as anonymous.
版权声明:本文标题:reactjs - Deployed React app not rendering the component as it does in the dev environment - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741276769a2369774.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论