课程: Micro Front-End Architecture with React

免费学习该课程!

今天就开通帐号,24,700 门业界名师课程任您挑!

Cart team development

Cart team development

- [Instructor] For the cart team, the same way micro-frontend was set up for the listing team, that same way the cart team also set up their micro-frontend project. The difference is that the cart is running on port 3002. And also, it is exporting the same thing. So the only difference in their setup is the port where it's working, the name that is being identified when it's being hosted for the bonding together. The third config is also set up, just like the listing teams. So, the App.jsx is bringing in a component for cart page, the cart page itself, and then the route to the cart page. Our styles contain the index.css, which is also a set up for Tailwind. And the component cart page, what this happens or what this handles is, when a file is been added to the cart, the cart page handles or catch that cart item and display. We are using useEffect and useState because we need to manage the state, which is the cart items, and then update the cart items. We are also using a React icon…

内容