Building out a React front end that calls onto a Flask API is very concise and easy, but very powerful. You have access to a very powerful back end in Flask that works very well with databases and storing information.

Flask is a microframework for Python, it is very easy to get started with and easy set up for a simple CRUD application. Flask is very simple to set up and create a small application with, but it is also easily scalable if you want to grow your application. You can read my previous blog post about creating an API in Flask here.

Starting a React app is very simple and user friendly, if you’re creating a single page application I recommend use using npx create-react-app my-app , if you’re looking for something more in depth I recommend looking at the React Docs.

For this blog I’m gonna create a small single page application that would hook to the Flask API through fetch calls allowing for GET request. After creating your React application with create-react-app make sure your Flask application is up and running, my Flask application will be open on http://localhost:5000.

#javascript #flask #python #react #api

“Hooking” your React frontend to your Flask API
1.40 GEEK