I am working with this flask react template project here and I am running into an issue
https://github.com/bonniee/react-flask
When rendering index.html, I want to pass back some data from flask
@app.route('/')
def hello_world():
return render_template('index.html', somedata="YOOOO")
And use it in the react components
render() {
this.loadDataFromServer();
return <h1>sup? {{somedata}}</h1>;
}
});
Is there a clean way to do it in this project format?