- To connect the client to the server, add a method to the class: – – We’ll use Axios to manage the AJAX call: – – You should now have: – – To connect this to Flask, open a new terminal window, navigate to the flask-microservices-users, activate the virtual environment, and…
- What would happen if the AJAX request took longer than expected and the component was mounted before it was complete?
- Finally, update the method to display the data returned from the AJAX call to the end user: – – Let’s create a new component for the users list.
- Add a new file to that folder called UsersList.jsx: – – Why did we use a functional component here rather than a class-based component?
If you’re new to React, review the Quick Start and the excellent Why did we build React? blog post. You may also want to step through the Intro to React tutorial to learn more about Babel and Webpack.
Continue reading “Microservices with Docker, Flask, and React”