Some starter code for React on Flask.
$ nvm install 6
$ npm install -g webpack
$ npm install
$ webpack --watch
(The program should not stop running. Leave it running.)
Make a change to scripts/Content.js
. Webpack should detect the change and
print a bunch of stuff.
Do not manually edit static/script.js
!!
Stuff that is added to scripts/
and referenced somewhere else will
automatically be packaged into static/script.js
.
Click on the green button on app.py
, or open up a new terminal and type:
$ python app.py
I'll explain what all this does in a bit. For now, use it as a starter to write some React code.