V
V
Vlad Sklyarenko2017-02-08 20:44:26
Flask
Vlad Sklyarenko, 2017-02-08 20:44:26

How do I get React and Flask to interact?

Guys, this is a stupid question. But maybe you can advise. I want to create a one-page site client React + Redux server Python framework Flax. But he screwed up at the very beginning. I learned a lot about Reat, redux. It's not bad at all to create a client side. With Flask With a grief in half understood. But how to combine all this and host everything on one server so that I can request information from Flux, and all rendering, graphics and display was using React.
I do not understand the mechanics of loading the client part on the server. How to make it all work? Maybe you need to write in Webpack?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2017-02-08
@MAKAPOH

At the root link, you give html with a compiled react application (js, css).
To return the data necessary for the operation of the react application, write an API through which you drive the data in json format.
Something like this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question