How to Create a Flask + React Project | Python Backend + React Frontend

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ธ.ค. 2024

ความคิดเห็น • 333

  • @AM-nv4ol
    @AM-nv4ol 2 ปีที่แล้ว +111

    one of the best tutorials i've ever watched in general. everything is broken down so well and your delivery is perfectly concise. well done.

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  2 ปีที่แล้ว +3

      Thank you!!

    • @cometolearn8598
      @cometolearn8598 ปีที่แล้ว

      @@ArpanNeupaneProductions Bro here You said arpan@Arpan-MBP React-Flask-Video % npx create react ct-app client.
      What do we replace 'arpan@Arpan-MBP' I replaced it with my user data like this 'MyUSER@MyUSERworks doesn't work I even put the '-MBP' in front of the second MyUser it still doesn't work. Can you please help me with this?

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  ปีที่แล้ว

      @@cometolearn8598 you don’t have to do that. That’s just my computer stating that I am signed in as arpan on Arpan-MBP which is my laptop.

    • @cometolearn8598
      @cometolearn8598 ปีที่แล้ว

      @@ArpanNeupaneProductions in windows when I do: 'npx create ct-app client' it gives the error:
      npm ERR! could not determine executable to run
      npm ERR! A complete log of this run can be found in:
      npm ERR! C:\Users\MyUser\AppData\Local
      pm-cache\_logs\2023-06-11T03_39_26_191Z-debug-0.log

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  ปีที่แล้ว

      @@cometolearn8598 That is because create-react-app has been deprecated.

  • @nathanseals4819
    @nathanseals4819 2 ปีที่แล้ว +61

    Excellent content! As someone that loves using React but prefers Python for backend, this video is amazing. I did run into a CORS error when connecting the front and back-end. The fix was as simple as installing and importing Flask-CORS to my server.py. Thanks again!

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  2 ปีที่แล้ว +3

      Of course! Thank you so much for watching!

    • @renatox5288
      @renatox5288 ปีที่แล้ว +1

      mee too, i dont know why. but this can affect security no?

  • @sf-zr3oj
    @sf-zr3oj 5 หลายเดือนก่อน +5

    Thank you, man! I'm from Brazil and don't found nothing in my language so good like this video. You Are great!

  • @xXHelsingGamingXx
    @xXHelsingGamingXx 3 ปีที่แล้ว +28

    You are freaking awesome building and explaining react + flask as minimal as it gets!!!

  • @ashdotpy
    @ashdotpy ปีที่แล้ว +3

    ive watched 3 or 4 other videos trying to get this to work and finally got it thanks to yours. well explained and walked through! thanks!!

  • @amitrangwal7177
    @amitrangwal7177 2 ปีที่แล้ว +3

    Finally one Tutorial That connects the flask and react and it happens on my system thanks for the tutorial.

  • @matthew_kompel
    @matthew_kompel 2 ปีที่แล้ว +6

    awesome video man! I'm new to this stuff and your content really helps me. I wish I new about your videos before I started a project as I would have progressed a lot more. Either way, I really appreciate the content you make.
    recently one of my best friends from high school passed away and I wanted to make something in memory of him and I thought that making a website would be the best for him. Your videos have really allowed me to accomplish my goal. He was like a brother to me and because of you I can become closer to him. Thank you!!!!!

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  2 ปีที่แล้ว

      Thank you so much for your support and taking the time to write that. I really appreciate it! Also, I'm very sorry for your loss.

    • @MagiePolyn
      @MagiePolyn 2 หลายเดือนก่อน

      How far a you now ?

  • @jonathanbaird1633
    @jonathanbaird1633 2 ปีที่แล้ว +14

    If anyone is getting a proxy error with ECONNREFUSED. Then just restart the frontend.

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  2 ปีที่แล้ว +2

      Thanks for sharing!

    • @xfirexfirecun9672
      @xfirexfirecun9672 2 ปีที่แล้ว +2

      @@ArpanNeupaneProductions not working =\
      Could not proxy request /members from localhost:3000 to localhost:5000/

    • @classictimmy
      @classictimmy ปีที่แล้ว +2

      @@xfirexfirecun9672 I am getting the same error. Have you found a solution?

    • @abikous
      @abikous 11 หลายเดือนก่อน +1

      Wow I was stuck on this for hours. Thank you!

  • @mitchell-conrad
    @mitchell-conrad 2 ปีที่แล้ว +7

    Great video, this really helped me out. Python is new for me, and I wanted to jump into it by making a web app. This gave me a great start, it was so easy to follow

  • @juliabuchko4204
    @juliabuchko4204 3 ปีที่แล้ว +8

    so good, the best tutorial I managed to find for my project

  • @syeds4380
    @syeds4380 4 หลายเดือนก่อน +1

    Great video, an issue I was running into was using localhost for the JSON file, and so when I replaced localhost:3000 with 127.0.0.1, and after loading Localhost:3000 this seemed to work. Awesome job!

  • @mohajeramir
    @mohajeramir ปีที่แล้ว

    Much appreciated. I have been thinking about this for a while. Really nice to see someone explaining it crisp.

  • @DRDR3ADSA
    @DRDR3ADSA ปีที่แล้ว

    Man, so simple and easy. This is bang on! Love it

  • @shreehari2589
    @shreehari2589 ปีที่แล้ว

    This is the type of content no one makes and literally very important, keep up the good work, can you make a video on how to integrate flask with react native

  • @purushothamanpalanichamy6542
    @purushothamanpalanichamy6542 ปีที่แล้ว +3

    please help me with this error im stuck for ine day " JSON.parse: unexpected character at line 1 column 1 of the JSON data"

  • @vatssv3006
    @vatssv3006 2 ปีที่แล้ว +8

    Simple, to the point high quality content. Loved it!

  • @sthefanocarvalho2823
    @sthefanocarvalho2823 2 ปีที่แล้ว +2

    That was great!
    Really helped me.
    You've just got a sub!
    Keep it up :)

  • @XxxRay3
    @XxxRay3 ปีที่แล้ว +1

    Now this tutorial is one of my core memory
    All concepts got ingrained ♥️

  • @dineshsaitejaparuchuri9748
    @dineshsaitejaparuchuri9748 11 หลายเดือนก่อน

    🎯 Key Takeaways for quick navigation:
    00:29 📁 *Created a folder named "flask-server" for the Python backend, then generated an empty file "server.py" within it.*
    01:20 🔄 *Created a React app using `npx create-react-app client` for the frontend in the "react-flask-video" folder.*
    02:23 ⚙️ *Configured the backend by creating a virtual environment, installing Flask, and setting up a basic Flask app with a route returning a JSON array of members.*
    04:41 🗑️ *Removed unnecessary files and configured the frontend's `package.json` to proxy requests to the backend running on `localhost:5000`.*
    05:52 🖥️ *Modified the frontend's `App.js` file, using `useState` and `useEffect` to fetch backend data and display it on the frontend.*
    08:35 🔄 *Successfully fetched backend API data, displayed "members" on the frontend, and handled loading state during API request.*
    Made with HARPA AI

  • @Juswahh
    @Juswahh 2 ปีที่แล้ว +1

    huh python is pretty sweet I shouldve been using this for my backend a long time ago lol. awesome tutorial man simple and very quick

  • @lilburtonboy7489
    @lilburtonboy7489 2 ปีที่แล้ว +2

    Do routes need to be registered or something? I have the exact same thing you have here at the4 beginning, but I get a 404 when I go to /members.

  • @Engr.SharoonHoney
    @Engr.SharoonHoney 7 หลายเดือนก่อน

    Simple and to the point with fabulous explanation ❤

  • @tiyashaghosal183
    @tiyashaghosal183 2 ปีที่แล้ว +2

    Hey, I needed a little help. Even though the members array is showing in my console, but in the web page it is still showing "loading..." Can anyone help me with this? Thanks a lot!

  • @mookjais
    @mookjais ปีที่แล้ว

    Not too much, not too little. Fantastic tutorial, thanks!!

  • @felipedepra2745
    @felipedepra2745 7 หลายเดือนก่อน

    Amazing video, many thanks!!! Keep doing this great job.

  • @MinhPhạm-c1l
    @MinhPhạm-c1l 11 หลายเดือนก่อน +1

    Please help me I cannot see the return api in local:500. "This site can’t be reached localhost refused to connect." is all it says to me

  • @wojciechzarzecki1286
    @wojciechzarzecki1286 2 ปีที่แล้ว +1

    great option to just understand basic seting up the projetc! thanks!

  • @wohu1
    @wohu1 2 ปีที่แล้ว +1

    Hi thanks for the video. I wonder how you install the autocomplete? I tried snippet installed but it seems not working thank you.

  • @lakshaychauhan9190
    @lakshaychauhan9190 3 ปีที่แล้ว +4

    Simple, good explanation! Thanks man really helpful :)

  • @5enox
    @5enox 9 หลายเดือนก่อน +1

    Really amazing and easy to follow, just one question, If a user uses the network developer tool, The backend API can be exploited and scraped, How can We hide it, or avoid this situation

  • @개발자가되려고발악하
    @개발자가되려고발악하 ปีที่แล้ว

    This is insane...! Thank you so much from Korea.

  • @heitormbonfim
    @heitormbonfim 2 ปีที่แล้ว +1

    In only 10 minutes, impressive!

  • @anirudhsuri6034
    @anirudhsuri6034 2 ปีที่แล้ว

    Hello. But how will be get the url parameters from backend... e.g. in flask route and how can be reflet that in axios...?? thanks.

  • @roboticproccessautomationr9200
    @roboticproccessautomationr9200 3 ปีที่แล้ว +3

    Thank you very much for your video ... But I have a question ... how do you deploy the project? above all I would like to know how to do in windows server for example .... greetings.

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  3 ปีที่แล้ว

      You're welcome! I haven't deployed to a Windows server before so I'm not sure. Maybe try looking up documentation for it or finding some videos that may provide you with information?

  • @gemymohamed9334
    @gemymohamed9334 ปีที่แล้ว +1

    Short & concise

  • @manpt123
    @manpt123 ปีที่แล้ว

    This is my first time as a backend dev understand how frontend gonna use my data in reactjs
    ... thank you

  • @bekirkagankaraahmetoglu
    @bekirkagankaraahmetoglu ปีที่แล้ว

    This is very useful in every way. Thanks for the video!

  • @alejandroortega25
    @alejandroortega25 5 หลายเดือนก่อน

    Actually it helped me a lot, thanks bro

  • @millpreetk1406
    @millpreetk1406 7 หลายเดือนก่อน

    venv is just for consistency of environment?

  • @ranjeetprasad4586
    @ranjeetprasad4586 3 หลายเดือนก่อน +1

    How will i protect

  • @jacknewman413
    @jacknewman413 ปีที่แล้ว +2

    For those having problems, spefically
    import "flask" could not be resolved from sourcePylancereportMissingModuleSource
    import "flask_cors" could not be resolved from sourcePylancereportMissingModuleSource
    YOU MUST do pip install flask, and flask-cors BEFORE, BEFORE you activate the virtual environment! I spent so long trying to figure out why i was getting this error, and I JUST DISCOVERED IT.
    Then in your virtual enviorment install them as well.

  • @kennardsugirotok7374
    @kennardsugirotok7374 2 ปีที่แล้ว +1

    Hello! im a beginner. and I have a question. Why does the blank array in 8:31 makes the code to run only once? why is that? Thankyou!

  • @princedoshi1594
    @princedoshi1594 ปีที่แล้ว +4

    bro in the end the console is showing the following error caught (in promise) SyntaxError: Unexpected token '

    • @rektful
      @rektful 11 หลายเดือนก่อน +2

      have you figured this out?

    • @maxheinwal5084
      @maxheinwal5084 2 หลายเดือนก่อน

      try restarting everything. then start python server, then start react. for me it worked

  • @millpreetk1406
    @millpreetk1406 7 หลายเดือนก่อน

    what's the plugin you're using that shows you the size of the react import or whatever? as well as the one that allowed the quick sample upload? I tried and those features didn't work for me. But tutorial is overall good and concise, love it

  • @antoniomatos5540
    @antoniomatos5540 3 ปีที่แล้ว +4

    The video was awesome! Could you tell me how react knew that the port of Flask was 5000?

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  3 ปีที่แล้ว +1

      Thanks! React knows that the port was 5000 because of the proxy that was set in the package.json file in the frontend.

    • @antoniomatos5540
      @antoniomatos5540 3 ปีที่แล้ว +1

      @@ArpanNeupaneProductions Thanks for the fast response! Have a nice day

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  3 ปีที่แล้ว

      @@antoniomatos5540 You too!

  • @shamsshaikh2887
    @shamsshaikh2887 ปีที่แล้ว

    thank you so much for such a precise video, that is efficient and succinct

  • @millerbento9785
    @millerbento9785 ปีที่แล้ว

    Do you have to do something specific to deploy it? I mean, have the Python back end and Flask front end running in the server.

  • @Ananiascn
    @Ananiascn ปีที่แล้ว

    Thanks for the video! Your content really helped me.

  • @mateuspokemon01
    @mateuspokemon01 2 ปีที่แล้ว +2

    Despite having configured the proxy correctly, it still makes requests to port 3000 instead of 5000 when checking on the dev tools network tab. Any idea why is that?

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  2 ปีที่แล้ว +1

      Is your server hosted on port 5000?

    • @mateuspokemon01
      @mateuspokemon01 2 ปีที่แล้ว +4

      @@ArpanNeupaneProductions I had to replace the localhost on the proxy with 127.0.0.1 to make it work. Thank you anyway!

    • @bryandean322
      @bryandean322 ปีที่แล้ว +1

      @@mateuspokemon01 this fixed it for me

  • @samvhora9076
    @samvhora9076 2 ปีที่แล้ว +1

    hey i tried it and this error came : I know this is minor problem but as I'm new to react i cant figure out why and where it parsing html as json instead of accessing members
    SyntaxError: Unexpected token '

  • @RSA1981
    @RSA1981 2 ปีที่แล้ว +2

    Hi Arpan, thank you for the great tutorial. I am using a Mac just to familiarise myself with this OS. Two questions please. 1) I can only find debug console. I can't seem to see the Console where the object can be printed. Secondly I am not entirely sure why the app only shows Loading.... I don't understand why it is undefined. The browser returns results but something is missing.
    import React, {useState, useEffect } from 'react'
    function App() {
    const [data, setData] = useState([{}])
    useEffect(() => {
    fetch("/members").then(
    res => res.json()
    ).then(
    data => {
    setData(data)
    console.log(data)
    }
    )
    }, [])
    return (
    {(typeof data.members === 'undefined') ? (
    Loading...
    ) : (
    data.members.map((member, i) => (
    {member}
    ))
    )}
    )
    }
    export default App

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  2 ปีที่แล้ว +1

      Can you share the code in your Python file?

    • @jikarnajmal-din6221
      @jikarnajmal-din6221 ปีที่แล้ว

      The front end port might be taken by another task. free up the port and it will work.

  • @vulcanhd1649
    @vulcanhd1649 2 ปีที่แล้ว

    How would you "build" the app and launch it on the web, as it is right now for example, for example to Heroku

  • @srb.11
    @srb.11 ปีที่แล้ว

    Here proxy has been set for localhost. But if I want to deploy it, what should I replace it with?

  • @santoshernandez5677
    @santoshernandez5677 3 ปีที่แล้ว +1

    Excellent job. This video was very helpful. Thank you.

  • @luisgranados2006
    @luisgranados2006 3 ปีที่แล้ว +6

    Hi Arpan, thank so much for your tutorial, it will help me a lot in my projects :D.
    But, I have a question, what should we do if we want to deploy the project? Will they have to be separated? for example, flask in "pyhtonAnyWhere" and react in "Versel"? Or, can we keep them together? for example, together in "Vercel"?

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  3 ปีที่แล้ว +2

      Thank you for liking the video! I haven’t done a video on deployment because I’ve been really busy with school, but if you’d like to deploy a project like this, I’d recommend checking Miguel Grinberg’s video on it: th-cam.com/video/h96KP3JMX7Q/w-d-xo.html

    • @luisgranados2006
      @luisgranados2006 3 ปีที่แล้ว +1

      @@ArpanNeupaneProductions :o Dont worry. Thank so much, I will check that tutorial

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  3 ปีที่แล้ว

      @@luisgranados2006 👍

    • @animeshmishra4282
      @animeshmishra4282 3 ปีที่แล้ว

      I am having the same doubt
      Like if i deploy an api and app at two different domains or something else

  • @ljrahn5619
    @ljrahn5619 2 ปีที่แล้ว +2

    Keep creating awesome videos like this! You'll reach a lot of viewership in no time. Thanks very much!

  • @WilsonWanjiru-t2u
    @WilsonWanjiru-t2u ปีที่แล้ว

    Very informative and easy to understand. Thanks

  • @karimpanacci
    @karimpanacci ปีที่แล้ว

    Basically there are 2 servers right? The nodejs server and then the python server? Or am I wrong?

  • @ReactFli
    @ReactFli 2 ปีที่แล้ว +1

    so how to deploy that to netlify?

  • @bryngoldman7373
    @bryngoldman7373 ปีที่แล้ว

    Hey, removing the logo and index files is creating a compile error. When I do not remove them, my app has a logo in the background. How do I fix this?

  • @soldadopreciso
    @soldadopreciso 2 ปีที่แล้ว +1

    Pease help me with this Error, when test the fetch option.
    Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

    • @iphoneUser564
      @iphoneUser564 2 ปีที่แล้ว

      i have the same problen did you find a fix?

    • @laycookie-f6i
      @laycookie-f6i 2 ปีที่แล้ว

      @@iphoneUser564 If any one else has this make sure you are fetching data from the back-end and not the front-end

    • @kylekelly7232
      @kylekelly7232 2 ปีที่แล้ว

      @@laycookie-f6i how do I know where I am fetching it from? I had to remove the "proxy": "localhost:5000" line from the package.json file and include a setupProxy.js file with http-proxy-middleware where I configured the target: "localhost:5000" and I'm still getting this "Uncaught (in promise) SyntaxError: Unexpected token '

  • @JorgeBlancoPhotography
    @JorgeBlancoPhotography 3 ปีที่แล้ว +2

    This was an awesome tutorial thank you very much!

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  3 ปีที่แล้ว

      Thanks!

    • @JorgeBlancoPhotography
      @JorgeBlancoPhotography 3 ปีที่แล้ว +1

      @@ArpanNeupaneProductions would be cool to see how to deploy a project like this, I like the python react combo, seems to be a clean and clear environment.

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  3 ปีที่แล้ว

      @@JorgeBlancoPhotography I see, I haven't done a video on deployment because I've been busy with some personal projects. However, I would recommend that you check this video out to learn how to deploy a Flask + React App to Heroku: th-cam.com/video/h96KP3JMX7Q/w-d-xo.html

  • @fanir2661
    @fanir2661 3 ปีที่แล้ว +4

    Hi, great tutorial Thank you! There's just one problem I'm having - I get an error in my localhost:3000 "Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0" and don't see the json that was sent. Do you have any idea how to solve this?

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  3 ปีที่แล้ว

      Hmm, do you have a link to your code? If it’s a SyntaxError then can you please check your code on the frontend side to make sure that it is the same as the code in the video?

    • @radhesaini9689
      @radhesaini9689 2 ปีที่แล้ว +3

      Stop react and restart again problem will be resolved

    • @nathanseals4819
      @nathanseals4819 2 ปีที่แล้ว +4

      I ran into a similar issue. The request to the server was refused because of CORS. In your server, run "pip3 install flask_cors", then in your server.py import the cors (from flask_cors import CORS), lastly insert "CORS(app)" under the app declaration. This will allow your react project to make Cross-Origin requests.

    • @ur_4180
      @ur_4180 2 ปีที่แล้ว +1

      @@nathanseals4819 i had a similar problem, i tried to follow your suggestion and apparently it works. Thank you for helping me
      sorry i'm not fluent in english

    • @harshvpatel1542
      @harshvpatel1542 2 ปีที่แล้ว

      @@radhesaini9689 Thank you bro. I spent 2 hours solving this issue and then just restarted server work for me

  • @Covalent5
    @Covalent5 2 ปีที่แล้ว

    Excellent tutorial. One question: If I wanna deploy it, what do I put in the proxy? My APIs public IP?

  • @TitaniumTronic
    @TitaniumTronic 2 ปีที่แล้ว +1

    Hello, this is the most useful video I found, but please make a video on how to setup a group project, like one person does backend and one does frontend

  • @theoneaboveall2071
    @theoneaboveall2071 ปีที่แล้ว +1

    Can i host it on netlify

  • @waleedazam7078
    @waleedazam7078 2 ปีที่แล้ว +1

    hey, I am following it, for some reason not able to fetch the data on my console and so on the front end, any help?? what I am doing wrong here

  • @noir371
    @noir371 2 ปีที่แล้ว

    Your keyboard sounds amazing

  • @lenovok4note298
    @lenovok4note298 ปีที่แล้ว

    Hello bro i need to contacts on some flask issue , for most commands it is showing object not found and commandnotfoundexception , i think you can help this

  • @barblehurgy
    @barblehurgy ปีที่แล้ว

    Perfect explanations here.

  • @stumpydes
    @stumpydes 3 ปีที่แล้ว +1

    Can they all work on single server, i am looking for running a landing page using flask itself

  • @Randomredditvids_
    @Randomredditvids_ ปีที่แล้ว

    hello, can someone help, I added proxy to package.json, but my react app still points to localhost 3000 and cannot find data

  • @Khhghhfd5755
    @Khhghhfd5755 3 ปีที่แล้ว +1

    So great logic to get the API, but how to use it to make a application? Thank you. Can I should normal react application to use this API? Thank you. It's like, if I'm gonna make some input, how can I make sure the input data that will use the API to go to be in the database? Thank you so much.

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  3 ปีที่แล้ว +1

      Yes! This API can be used in a real application. If you want to receive input to a database, you can make forms in React to type input into. Then, you can store the value of each input form in a variable and send that variable through a post request to the backend using Axios. In the backend, you’ll just have to set up routes for that post request and you can access the data that was sent from the frontend and use it however you’d like.

  • @xXHelsingGamingXx
    @xXHelsingGamingXx 3 ปีที่แล้ว +1

    Hi, Could you mention the theme which you are using in VS Code, cause its awesome!

  • @pshr2447
    @pshr2447 3 ปีที่แล้ว +1

    Thanks for the tutorial.... But my python code needs input when you call it, which I'll be obtaining from the frontend...so how can i make the call to the api which needs an input to output data...
    Also if i have my project on say pythonanywhere or heroku, should i follow the same steps shown here ?

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  3 ปีที่แล้ว +1

      Can you further specify what you're trying to do so that I can better assist you? Are you trying to get data from the frontend such as the input entered in forms and receive that same input in the backend?

    • @pshr2447
      @pshr2447 3 ปีที่แล้ว +1

      @@ArpanNeupaneProductions Yeah mate, basically I'm making a youtube analytics website, like getting playlist length etc... I'm working on my frontend with react js, so I'll be getting some input from the user such as the playlist id, etc..
      then i want to take all that arguments and call my python api which will have different classes for fetching different data from the youtube api...so basically i just needed to know how can i pass those arguments to the python api from the frontend.
      (When I'm going to push it in production, I'm going to host my frontend on vercel and on my Python api on heroku)

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  3 ปีที่แล้ว +1

      @@pshr2447 I see, in your frontend with React, you can send those input values to the backend with Axios by sending POST requests. Your backend will then catch those POST requests and then get the request body with the input values and you can use them however you’d like :)
      Hope this helps!

    • @pshr2447
      @pshr2447 3 ปีที่แล้ว +1

      @@ArpanNeupaneProductions thanks for the suggestion, I'll check out axios right now

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  3 ปีที่แล้ว +1

      @@pshr2447 No problem!

  • @millpreetk1406
    @millpreetk1406 7 หลายเดือนก่อน

    it gets console logged twice for me, why do you think this is happening?

  • @deepikasrinivasan8933
    @deepikasrinivasan8933 2 ปีที่แล้ว

    Hi. Where is the venv creation for windows?

  • @frankiehadwick9956
    @frankiehadwick9956 2 ปีที่แล้ว +1

    hey, when i run it after doing the java function to fetch the json, it outputs res not defined, however i copied everything you did

  • @Cdxvfx
    @Cdxvfx 3 ปีที่แล้ว +1

    Bro demand of react + python ?? From company side. Is it worth learning in 2021

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  3 ปีที่แล้ว

      React is the most popular frontend library and is used a lot. Python is great as well and is great in machine learning, data science, AI, and web development and they can both be used to create great applications.
      Now, I don't know about companies since I haven't worked at any because I'm only 13, but I'm sure some companies do use them. Larger companies might also use them along with other languages.

  • @archangel9582
    @archangel9582 3 ปีที่แล้ว +1

    Will react forward all the sessions to the browser?

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  3 ปีที่แล้ว

      Can you please clarify what you mean by forwarding all the sessions to the browser?

    • @archangel9582
      @archangel9582 3 ปีที่แล้ว

      @@ArpanNeupaneProductions Yes, Does it do that?

  • @hadleyhou6513
    @hadleyhou6513 ปีที่แล้ว

    this got me confused: if I remove line that checks whether data.members is defined or not, then i got error message 'map' is undefined. Does anyone know why?

  • @PaulThiongo-rv7so
    @PaulThiongo-rv7so 7 หลายเดือนก่อน

    simple and clear .Thanks

  • @christophernoble8284
    @christophernoble8284 3 ปีที่แล้ว +1

    Thanks for the video. I get an error when mapping data.members in react. 'Property "members" does not exist on type '{}'.' Can't find any good answers on Google :/. Any advice?

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  3 ปีที่แล้ว

      Can you share the code?

    • @christophernoble8284
      @christophernoble8284 3 ปีที่แล้ว +1

      @@ArpanNeupaneProductions It's the same as yours only I'm using typescript. I think there's an interface involved

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  3 ปีที่แล้ว

      @@christophernoble8284 I see, is the backend the same?

    • @christophernoble8284
      @christophernoble8284 3 ปีที่แล้ว +1

      @@ArpanNeupaneProductions Yeah I figured it out. With typescript I have to explicitly define data types of incoming json elements in an interface, before I can map. More confusing. Great video, I'm just using a different environment

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  3 ปีที่แล้ว

      @@christophernoble8284 Sweet! Good luck with your project :)

  • @Grinwa
    @Grinwa ปีที่แล้ว

    Please am completely new to js i want to make gui for my API
    it is basically a webview that will load a website with custom cookie's, i have no idea how to do it with js, is it even possible. Do u recommend any documentation

  • @UsmanButt-en9xb
    @UsmanButt-en9xb 3 ปีที่แล้ว +1

    can we use it for mobile apps (react-native)

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  3 ปีที่แล้ว +1

      Yeah. Since both React Native and React use JavaScript, you can do the same thing.

  • @BoltAtlas
    @BoltAtlas ปีที่แล้ว

    Do we *Have* to create a virtual environment in order to make a connection between the front and the back end?
    That's the only step I omitted, and I'm getting this error in the terminal when I run the React app :
    Proxy Error: Could not proxy request /members from localhost:3000 to htttp://localhost:5000/
    and on the browser itself, it gives the following error:
    JSON.parse: unexpected character at line 1 column 1 of the JSON data
    any help?

    • @levivolkart126
      @levivolkart126 9 หลายเดือนก่อน

      That video helped me solve the issue: th-cam.com/video/N4yUiQiTvwU/w-d-xo.html

  • @jayadtt
    @jayadtt 2 ปีที่แล้ว

    Can we not do this in jquery/plain js ajax at client side,,,, I’m still not getting why separate instance for running react when you can do same thing with ajax. Please correct me / help me understand this better

  • @jacobgoldenart
    @jacobgoldenart ปีที่แล้ว

    Thanks. Super helpful and clear!

  • @achrafkandoussi9525
    @achrafkandoussi9525 7 หลายเดือนก่อน

    What theme is that ?

  • @aryanpanwar6399
    @aryanpanwar6399 3 ปีที่แล้ว +1

    Which VSCode theme are you using bro its really cool?

  • @alireza2295
    @alireza2295 9 หลายเดือนก่อน

    Short and sweet. thanks

  • @Rosthetic14
    @Rosthetic14 2 หลายเดือนก่อน

    do i have to install flask again n again for every new project?

  • @skateboardpete8236
    @skateboardpete8236 2 ปีที่แล้ว

    What would need to be done to web host this (say on PythonAnywhere lol), just change the address of the proxy in the package.json file ?

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  2 ปีที่แล้ว

      You'd first need to run 'npm run build' in the frontend and serve the index.html file in your build folder in your backend in order to deploy to PythonAnywhere.

  • @agustintisera6992
    @agustintisera6992 2 ปีที่แล้ว

    Hey Arpan! I'm looking for the next step on this tutorial, basically trying to define a sqlite3 db to have a simple CRUD for users. I'd appreciate that knowledge, not necessary has to be recorded with a video. Any github/reference is welcome!

  • @emars0
    @emars0 ปีที่แล้ว

    If i wanted to return an img url, how would i do that? Im new to python and I cant find any tutorials on how to do this. Btw, amazing video, explains things perfectly, had problems with CORS but fixed that easily.

  • @OctaBrainComputer
    @OctaBrainComputer 4 หลายเดือนก่อน

    Why it is show error for html doctype error

  • @chance_robinson
    @chance_robinson 2 ปีที่แล้ว

    Arpan, do you have any tutorials or know of any where I can put my python backend + react frontend on a ubuntu server using NGINX?

    • @chance_robinson
      @chance_robinson 2 ปีที่แล้ว

      Everything work perfect locally, I would just like to transfer what I have onto a server, I am using a digital ocean ubuntu server with nginx.

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  2 ปีที่แล้ว

      Unfortunately, I do not. Maybe watch this video to see if this helps: th-cam.com/video/KFwFDZpEzXY/w-d-xo.html

  • @debarghyakundu908
    @debarghyakundu908 11 หลายเดือนก่อน

    sir i have created a python code which convert sign language to text ... can u pls help me to create a website like the one above

  • @andrewzolensky9807
    @andrewzolensky9807 ปีที่แล้ว

    This was a great video! Would you be willing to do one on how to host it using a cloud provider like AWS or GCP?

  • @maryamshahid7367
    @maryamshahid7367 2 ปีที่แล้ว

    How can I update the backend from the react app? add a new member or delete one. Is it possible? Thanks.

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  2 ปีที่แล้ว

      You can send POST requests that contain data to an endpoint in the backend. The endpoint can then handle the data and do things like adding it to a database.