Answer the question
In order to leave comments, you need to log in
How to get data in react component?
There is a code in flask:
from flask import Flask, jsonify
app = Flask(__name__)
i = [
{
'id': 1,
'title': 'Hello'
},
{
'id': 2,
'title': 'World'
}
]
@app.route('/', methods=['GET'])
def get_task():
return jsonify({'i': i})
if __name__ == '__main__':
app.run(debug=True)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question