ts-axios | Using TypeScript to Refactor Axios Series Articles https
kandi X-RAY | ts-axios Summary
kandi X-RAY | ts-axios Summary
Using TypeScript to Refactor Axios Series Articles https://www.cnblogs.com/wangjiachen666/category/1510064.html
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ts-axios
ts-axios Key Features
ts-axios Examples and Code Snippets
Community Discussions
Trending Discussions on ts-axios
QUESTION
I have heard of people who use Flask with Reactjs to build REST APIs. However, I am very confused by why Flask is needed when Reactjs can handle GET and POST requests.
To bring some context behind why this question is important for me: At work, we build web apps where a customer/user inputs some data (e.g. favourite food). This data is then processed using python libraries and scripts and then an output (e.g. recipe for the food) is returned to the user.
Why might Flask with React be better than React by itself?
...ANSWER
Answered 2019-Dec-25 at 11:39React is just a javascript library which helps in building user interfaces, whereas flask is a microframework for building web applications. Handling http requests in the context of React means that it can make http requests and make decisions based on what they output. React does not have control over the business logic i.e the way the requests are going to get processed, which in your case is deciding recipe based on user's input. That's where flask or a backend comes into picture, it would take the input given by the frontend, do some processing and return some output. Over here http is just a medium of passing information from frontend to the backend.
To understand these concepts a bit more you could research more on the MVC architecture.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ts-axios
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page