Setting up Flask (Python) with React (jsx) The 2019 Stack Overflow Developer Survey Results Are InCalling an external command in PythonWhat are metaclasses in Python?Finding the index of an item given a list containing it in PythonDifference between append vs. extend list methods in PythonHow can I safely create a nested directory in Python?Does Python have a ternary conditional operator?How to get the current time in PythonHow can I make a time delay in Python?Does Python have a string 'contains' substring method?Loop inside React JSX

Are USB sockets on wall outlets live all the time, even when the switch is off?

Dual Citizen. Exited the US on Italian passport recently

What can other administrators access on my machine?

Springs with some finite mass

Realistic Alternatives to Dust: What Else Could Feed a Plankton Bloom?

Could a US political party gain complete control over the government by removing checks & balances?

I looked up a future colleague on LinkedIn before I started a job. I told my colleague about it and he seemed surprised. Should I apologize?

The difference between dialogue marks

Access elements in std::string where positon of string is greater than its size

What is the meaning of Triage in Cybersec world?

Extreme, unacceptable situation and I can't attend work tomorrow morning

Does a dangling wire really electrocute me if I'm standing in water?

What is the motivation for a law requiring 2 parties to consent for recording a conversation

How do you say "canon" as in "official for a story universe"?

Could JWST stay at L2 "forever"?

How to answer pointed "are you quitting" questioning when I don't want them to suspect

What is the use of option -o in the useradd command?

Should I write numbers in words or as numerals when there are multiple next to each other?

How can I fix this gap between bookcases I made?

How come people say “Would of”?

Inversion Puzzle

Why is my p-value correlated to difference between means in two sample tests?

Understanding the implication of what "well-defined" means for the operation in quotient group

If the Wish spell is used to duplicate the effect of Simulacrum, are existing duplicates destroyed?



Setting up Flask (Python) with React (jsx)



The 2019 Stack Overflow Developer Survey Results Are InCalling an external command in PythonWhat are metaclasses in Python?Finding the index of an item given a list containing it in PythonDifference between append vs. extend list methods in PythonHow can I safely create a nested directory in Python?Does Python have a ternary conditional operator?How to get the current time in PythonHow can I make a time delay in Python?Does Python have a string 'contains' substring method?Loop inside React JSX



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I have created a repository at https://github.com/celestialbunny/react_flask_template



I am trying to run a project that has flask as back-end while having React as a front-end. However, there are problems when rendering the webpages so far. Under the directory "templates/static/js/routes.js", I cannot manage to have the file under location "templates/static/js/components/Home.jsx" to be displayed under "templates/static/index.html" while running on localhost.



Can anyone tell me where I am doing it wrong for the routing purposes?



Here are the instructions to get things running:



  1. delete the node_modules folder

  2. run "python run.py" at project directory

  3. cd into "templates/static" and run "npm install"

  4. then under "templates/static" run "npm run watch"

Help much appreciated as I am still a newbie in python but setting up react alongside is something that I am not familiar with. Thanks in advance.










share|improve this question




























    0















    I have created a repository at https://github.com/celestialbunny/react_flask_template



    I am trying to run a project that has flask as back-end while having React as a front-end. However, there are problems when rendering the webpages so far. Under the directory "templates/static/js/routes.js", I cannot manage to have the file under location "templates/static/js/components/Home.jsx" to be displayed under "templates/static/index.html" while running on localhost.



    Can anyone tell me where I am doing it wrong for the routing purposes?



    Here are the instructions to get things running:



    1. delete the node_modules folder

    2. run "python run.py" at project directory

    3. cd into "templates/static" and run "npm install"

    4. then under "templates/static" run "npm run watch"

    Help much appreciated as I am still a newbie in python but setting up react alongside is something that I am not familiar with. Thanks in advance.










    share|improve this question
























      0












      0








      0








      I have created a repository at https://github.com/celestialbunny/react_flask_template



      I am trying to run a project that has flask as back-end while having React as a front-end. However, there are problems when rendering the webpages so far. Under the directory "templates/static/js/routes.js", I cannot manage to have the file under location "templates/static/js/components/Home.jsx" to be displayed under "templates/static/index.html" while running on localhost.



      Can anyone tell me where I am doing it wrong for the routing purposes?



      Here are the instructions to get things running:



      1. delete the node_modules folder

      2. run "python run.py" at project directory

      3. cd into "templates/static" and run "npm install"

      4. then under "templates/static" run "npm run watch"

      Help much appreciated as I am still a newbie in python but setting up react alongside is something that I am not familiar with. Thanks in advance.










      share|improve this question














      I have created a repository at https://github.com/celestialbunny/react_flask_template



      I am trying to run a project that has flask as back-end while having React as a front-end. However, there are problems when rendering the webpages so far. Under the directory "templates/static/js/routes.js", I cannot manage to have the file under location "templates/static/js/components/Home.jsx" to be displayed under "templates/static/index.html" while running on localhost.



      Can anyone tell me where I am doing it wrong for the routing purposes?



      Here are the instructions to get things running:



      1. delete the node_modules folder

      2. run "python run.py" at project directory

      3. cd into "templates/static" and run "npm install"

      4. then under "templates/static" run "npm run watch"

      Help much appreciated as I am still a newbie in python but setting up react alongside is something that I am not familiar with. Thanks in advance.







      python reactjs webpack






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 22 at 2:48









      Chai Chong TehChai Chong Teh

      235




      235






















          0






          active

          oldest

          votes












          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55292181%2fsetting-up-flask-python-with-react-jsx%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55292181%2fsetting-up-flask-python-with-react-jsx%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript