社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  MongoDB

如何获取使用express和mongodb创建的API数据并在React上输出结果

Sauhard iamSau • 4 年前 • 594 次点击  

https://www.youtube.com/watch?v=wPQ1-33teR4&t=8982s )他用React创建了一个前端,我很惊讶这里有静态数据,如下图所示以js on格式在js上传递, Data being stored into a variable

使用上下文来控制和传递 Those variable being extracted like shown in the figure

现在这些产品数据已经被传递到const{id,title,img,price}中,如图所示 This is where we have set the content that is being displayed

所有这些都工作得很好,但主要的问题是我使用express和mongodb创建的后端部分(使用postman进行测试,所以这一部分没有错),我想让这些数据在上面使用axios的方法中显示到我的React frontend中,我对如何对它们进行编程排序有问题 This image shows the backend data which i want to input into my React

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/56177
 
594 次点击