React JS CRUD Operations using JSON Server REST API | React JS Full Course

Поділитися
Вставка
  • Опубліковано 30 вер 2024
  • #reactjs #reactcrud #nihiratechiees
    This vides explains React JS CRUD Operations using JSON Server REST API
    Steps Followed
    ==================
    1, Implement Listing
    2, implement Create Employee with validation
    3, Implement details page
    4, Implement edit employee
    5, Implement Delete
    Installation steps
    =================
    1, Create new app
    npx create-react-app employee
    2, Create routing
    npm install react-router-dom
    3, Install bootstrap
    npm install bootstrap
    4, Install Json-Server
    npm install -g json-server
    GitHub Source code link
    ---------------------------------------
    github.com/nih...
    Join this channel to get access to perks:
    / @nihiratechiees

КОМЕНТАРІ • 183

  • @mohamedaziz2269
    @mohamedaziz2269 9 місяців тому +1

    .btn{
    display: inline-block;
    padding: 10px 20px;
    margin-right: 10px;
    }

  • @TheHelpOfNS
    @TheHelpOfNS Рік тому +5

    You have covered maximum scenarios buddy...what a great explanation.....i understand 80%...thanks 🙏.... 💕 From Telangana state...india

    • @NihiraTechiees
      @NihiraTechiees  Рік тому +1

      Thanks bro. I am really happy receive these kind of appreciations.. It's encouraging me to create more videos

  • @AnggaswangiPress
    @AnggaswangiPress Рік тому +4

    Amazing tutorial, the creator is generous, we don't need to buy coffee to get the code, thank you!

  • @rajeswarynarasimman3728
    @rajeswarynarasimman3728 Рік тому +4

    I learnt a lot from you today. I can't even begin to explain how useful this was. This was a quick tutorial that covers a variety of topics. I was able to understand everything when I watched the second time. I don't know any frontend technologies, so I had to watch twice. I had a similar project with strict deadline and this video was a lifesaver. Thanks a ton for making this video.

  • @KavinduRajapaksha-wf9zc
    @KavinduRajapaksha-wf9zc Рік тому +1

    when I pass the id to LoadDetail, LoadEdit, RemoveFunction the id indicated undefined. Can you explain why is that?

    • @NihiraTechiees
      @NihiraTechiees  Рік тому

      Can you put console.log check whether you able to pass and get id

  •  7 місяців тому

    Sir actually json file is not creating by giving this command in terminal
    json-server --watch db.json --port 8000

    • @NihiraTechiees
      @NihiraTechiees  7 місяців тому

      npm install json-server first install then try that command

  • @viruskreation
    @viruskreation Місяць тому

    how to get the serial vise id , getting random id and you its showing serially and futher method to specfiy the id

    • @NihiraTechiees
      @NihiraTechiees  Місяць тому

      Please use empty array or in the dummy record use number value in id column... For more details refer json server documents

  •  7 місяців тому

    Hello sir ID is generating like a5b6 not coming in sequence order 1,2,3

    • @NihiraTechiees
      @NihiraTechiees  7 місяців тому

      Clear the array in json file and try... It's creating based on old record

  • @chiragkamble9716
    @chiragkamble9716 5 місяців тому

    I have problem in installation of 4)JSON server
    Please help me

  • @beatsbgmabi2308
    @beatsbgmabi2308 2 місяці тому

    Number is not generated it creates some garbage values please explain that also

    • @NihiraTechiees
      @NihiraTechiees  2 місяці тому +1

      Can you create one dummy record in json arry (have id value as 1) . Any way it's fake api . We can't use for real time application

  • @sakyasamantaray146
    @sakyasamantaray146 4 місяці тому

    I am using video quality 480p but it is not clear visible

  • @PreethamGowda-ln7pv
    @PreethamGowda-ln7pv 11 місяців тому +1

    Sir how to use fastAPI instead of rest api

    • @NihiraTechiees
      @NihiraTechiees  10 місяців тому +1

      Will check and let you know. I don't have much idea in fastapi

  • @sakyasamantaray146
    @sakyasamantaray146 4 місяці тому

    Please sir make video on react with express.js

  • @lakshmidegala4683
    @lakshmidegala4683 5 місяців тому

    Hi bayya clear explanation thanks a lot,but the problem is the json file data is not showing in the browser
    Can you pls help me what the things are added in the project

    • @NihiraTechiees
      @NihiraTechiees  5 місяців тому

      Are you getting any error in console?

    • @BurguPrasanna2503
      @BurguPrasanna2503 4 місяці тому

      @@NihiraTechiees I'm getting error in console

  • @aladinunay859
    @aladinunay859 Рік тому +1

    Best React CRUD operation video!!!
    I begin with no knowledge on React and was able to build a copy of your employee app.
    Please upload more React tutorials.

    • @NihiraTechiees
      @NihiraTechiees  Рік тому

      Thanks for your valuable feedback 👍. Will plan for more videos upcoming weeks

  • @ACSKiruthiga
    @ACSKiruthiga 2 місяці тому

    I am facing an error 8n creating db.json it shows me db.json file not found what to do

    • @NihiraTechiees
      @NihiraTechiees  2 місяці тому

      First install json-server then try

    • @Thatcityboy697
      @Thatcityboy697 Місяць тому

      Create and open the db.json file manually.

  • @trickshorts4745
    @trickshorts4745 5 місяців тому

    Can anybody help me understand the react router

    • @NihiraTechiees
      @NihiraTechiees  5 місяців тому

      What you expecting about router?
      If you expecting basic info then just check my reactjs playliat

  • @mitjoshi8470
    @mitjoshi8470 5 місяців тому

    How to solve ID numbering issue?

  • @runraja398
    @runraja398 3 місяці тому

    Bro json server using chesi website live Loki host cheste work avathada

    • @NihiraTechiees
      @NihiraTechiees  3 місяці тому

      Json server is fake api...only used for development until you not having actual api...for production you cannot use this

  • @sakyasamantaray146
    @sakyasamantaray146 4 місяці тому

    Can we use react with express.js?

  • @mitindradutta7313
    @mitindradutta7313 Рік тому

    Why you are reloading the page on delete?
    You can only reload the component.
    But as the url not changing history.push not working.
    Reload the page is not the proper way.
    Can you please only reload the component, without reload page?
    Is this possible?

  • @meghanap-p2c
    @meghanap-p2c 8 місяців тому

    Hello sir , im not able to get sequence id number it is displaying random 4 digits numbers like 6a65 ...can you please help me !

  • @suyashdeshpande784
    @suyashdeshpande784 Рік тому

    plz help me
    When i navigate back to the landing page after submiting new info , yes i get the updated ui with newly upadated info
    but what i want is if the same website is opened in 2 tabs simuntanousely , if i add info in one of the tab , the landing page of the other tab should get automatically updated with the newly added info
    how can i achieve that ??

    • @NihiraTechiees
      @NihiraTechiees  Рік тому

      ua-cam.com/video/Lr0Sy8xE1hY/v-deo.html
      Follow redux pattern it will reflect automatically

  • @Randhirsingh-g9u
    @Randhirsingh-g9u Рік тому

    Hello sir ,thank you for this amazing tutorial for CRUD application. I have one question, we have one button on interface that is AddNew, can we create an another button where we can give the attendance for those employee who is already registerd and How? please respond

    • @NihiraTechiees
      @NihiraTechiees  Рік тому

      Yes we can add multiple buttons and events based on our requirement

  • @jadduharika8353
    @jadduharika8353 Рік тому

    I typed all the code as shown in the vedio . upto creating the table everything is good but the db.json data is not displaying in the table.

    • @NihiraTechiees
      @NihiraTechiees  Рік тому

      First check your api is running also check console for any error

  • @baravind286
    @baravind286 Рік тому

    one doubt for ex. we have 3 id's those are 1,2,3 then we have to delete 2nd id so remaining 1,3 id's are showing, instead of 1,3 how to show sequence like 1,2.

    • @NihiraTechiees
      @NihiraTechiees  Рік тому

      Brother here id column is unique so we cannot modify like that

  • @alexisrivera8746
    @alexisrivera8746 Рік тому

    if I copy your code and I use the json placeholder instead, will it still work the same way?

  • @moniralibadia8524
    @moniralibadia8524 Рік тому

    I can't save a new record. The save button is not working. Do you have any idea why?😢

  • @priyanshichourasiya6623
    @priyanshichourasiya6623 Рік тому

    In this i am not able to fetch json data
    I tried many times but it show failed to fetch so what should i do..?

    • @NihiraTechiees
      @NihiraTechiees  Рік тому

      Could you check the console what error is coming

  • @venkateswararaokondeti5735
    @venkateswararaokondeti5735 Рік тому +1

    I learn a lot of new things from this tutorial. Very useful. Thank you 🙏

  • @rajkumarrathod414
    @rajkumarrathod414 11 місяців тому

    hello nihira my data in payload is correct but api is only given an id

    • @NihiraTechiees
      @NihiraTechiees  11 місяців тому

      Can you confirm your api working fine?

  • @kanakaraju7655
    @kanakaraju7655 Рік тому

    Plz do more videos react Auth pagination

  • @nireekshaamin7300
    @nireekshaamin7300 Рік тому

    Great video.
    But had one doubt, when trying post with web api it gives bad request with json server it works fine. Can you help me with this.

    • @NihiraTechiees
      @NihiraTechiees  Рік тому

      Please share error details to my email
      Also please check your api working in postman

    • @nireekshaamin7300
      @nireekshaamin7300 Рік тому

      @@NihiraTechiees yes its working with postman

  • @aartipabale9113
    @aartipabale9113 Рік тому

    My edit button is not working
    There is one error (cannot read properties of undefined (reading 'length'))

    • @NihiraTechiees
      @NihiraTechiees  Рік тому

      Just check the parameter in your function, I think you misspelled

    • @aartipabale9113
      @aartipabale9113 Рік тому

      @@NihiraTechieesthanks I will check

  • @jershelldumayao3055
    @jershelldumayao3055 Рік тому

    Just wondering sir what to do if you want for these codes for example to listen to a different an existing api?

    • @NihiraTechiees
      @NihiraTechiees  Рік тому

      Concept is same for all REST api, you have to change the endpoint

  • @BARANITHARANJUCS
    @BARANITHARANJUCS 4 місяці тому

    Great video ❤

  • @kmax2356
    @kmax2356 Рік тому

    Thank you very much...this video is really help for beginner... ❤️❤️

  • @batubata7372
    @batubata7372 Рік тому

    This is a great video with easy to understand explanation. but I want to ask, what if I want to set the ID so that it can be displayed in a certain format (example; AB001 or XY123). Can you help me?

    • @NihiraTechiees
      @NihiraTechiees  Рік тому

      You have to pass this Id also from our post method. Make sure the ID value is unique

  • @NotNicooo
    @NotNicooo Рік тому

    Hello! when i click submit it automatically refresh and the data didn't save. Should i put some delay or what should be done on this end?

    • @NihiraTechiees
      @NihiraTechiees  Рік тому +1

      Add console log and verify, I believe you have some syntax issue,
      Also cross check the actual source code from GitHub, link I shared in description,

    • @NotNicooo
      @NotNicooo Рік тому

      @@NihiraTechiees Big thanks its working now i believe the issue was the e.preventDefault();.
      last question please,
      when i tried using navigate('/') it just goes to the main page, if i try to add
      navigate('/add',)
      then it will do nothing.. Any advise?

    • @NihiraTechiees
      @NihiraTechiees  Рік тому

      First you have to define your routing I think you not defined route "add" In the routing

  • @saikumarmogilla450
    @saikumarmogilla450 Рік тому

    Hi, I have a doubt, when we click delete button and after alert, the page is reloading, if we dont want to get page reloaded, then how? I tried to put e.preventDefault(), but its giving error

    • @NihiraTechiees
      @NihiraTechiees  Рік тому

      Your page refreshed due to other issue. Preventdefault is for post request

    • @howtovidoes372
      @howtovidoes372 Рік тому

      It reloads due to window.location.reload(). Remove that instead

    • @mitindradutta7313
      @mitindradutta7313 Рік тому

      Also I have the same query.
      Why page reloading on delete?
      Only component should reload.
      Also if you use history.push it will not gonna work.. because url is same.event will not fire.
      I am a beginner in react.
      Did you find any solution?
      If yes.please help me..
      It would be really helpful.

  • @SalmaSalma-my8qp
    @SalmaSalma-my8qp 10 місяців тому

    Thank you very much for formation 🤗

  • @ShortKaTime
    @ShortKaTime Рік тому

    thank you so much for this project very helpful😃

  • @yamillayicov7256
    @yamillayicov7256 Рік тому

    Thanks man, your're the best, you saved my life
    👍

  • @upasnasharma9553
    @upasnasharma9553 Рік тому

    Thank you so much , now i understand how to use API's

    • @NihiraTechiees
      @NihiraTechiees  Рік тому

      Great

    • @upasnasharma9553
      @upasnasharma9553 Рік тому

      @@NihiraTechiees can you pls continue with this video that how to upload multiple image in react

  • @ravirajmushigeri9031
    @ravirajmushigeri9031 Рік тому

    while watching this react tutorial feels peace, thank you sir

  • @UCS-SSVigneshbabu
    @UCS-SSVigneshbabu Рік тому

    json-server not properly connected. throw in 304 error

  • @dominicyutes7021
    @dominicyutes7021 Рік тому

    Excellent video, explained very damn straight....

  • @dattatraywashivale9905
    @dattatraywashivale9905 6 місяців тому

    Fantastic Video & lot to learn✅✅

  • @jmreviews3019
    @jmreviews3019 Рік тому

    which snippets extensions you used ?? for SFC

    • @NihiraTechiees
      @NihiraTechiees  Рік тому +1

      "Simple React Snippets" in VS Code

    • @jmreviews3019
      @jmreviews3019 Рік тому +1

      @@NihiraTechiees In coding interview, they asked me to build Sicky note with drop down menu which should have color names, color must change, then CRUD operations should happen, and using json. How to do this? can you do video on this.

    • @NihiraTechiees
      @NihiraTechiees  Рік тому

      Sicky note i am not understand, can you provide more info to my email

  • @valeriam1463
    @valeriam1463 Рік тому

    This is a great video Nihira. Thank you.
    However, I cannot get past the err_connection _refused /failed to fetch @localhost. Do you have any idea why?

    • @NihiraTechiees
      @NihiraTechiees  Рік тому

      Is your json server running in the port number of 8000?

  • @ALKASHIF-
    @ALKASHIF- 8 місяців тому

    he gays or hi guys ?

    • @NihiraTechiees
      @NihiraTechiees  8 місяців тому

      Appreciate your doubt 👍

    • @ALKASHIF-
      @ALKASHIF- 8 місяців тому

      @@NihiraTechiees
      welcome

  • @phiraveen7432
    @phiraveen7432 Рік тому

    Crystal clear explanation. Thank you for this video.

  • @mohamedawadaliawad2961
    @mohamedawadaliawad2961 Рік тому

    how to delete all data by button delete all

  • @venul2109
    @venul2109 Рік тому

    I refered many tutorials but they were not up to the mark. But you explained well the presentation is good bro👌thank you

  • @DurgaPrasad-xp5fi
    @DurgaPrasad-xp5fi Рік тому

    This is the best Reactjs CrUD operations vedio i have found.

  • @mohammedhasnain611
    @mohammedhasnain611 Рік тому

    Unable to create db.json file

    • @NihiraTechiees
      @NihiraTechiees  Рік тому

      I hope the command will create the file. Otherwise you can right click and create it's just json file.. .. While executing command you have to mention the file name

  • @MundoReactivoDev
    @MundoReactivoDev Рік тому

    Excellent explanation, thank you very much!

  • @renishsalakhana5603
    @renishsalakhana5603 Рік тому

    Great saved my time , did well , thanks!

  • @vemulaajiteshwar2568
    @vemulaajiteshwar2568 Рік тому

    Informational and straight forward, thanks for the tutorial and the Github repo it helped me to learn in practical way, good luck for future videos, keep coming with more videos !!

  • @tranngocson4109
    @tranngocson4109 Рік тому

    Great video, thanks so much

  • @surajsingh-kf6bg
    @surajsingh-kf6bg Рік тому

    Not Working Sir😢😭

    • @NihiraTechiees
      @NihiraTechiees  Рік тому

      Follow the steps and cross check with actual source code, code available in GitHub link in description

  • @mohammedhasnain611
    @mohammedhasnain611 Рік тому

    Sir edit page is working but it is not updating the table plzzz help...

  • @programmingwithnit5308
    @programmingwithnit5308 Рік тому

    Thank you

  • @flo2172
    @flo2172 9 місяців тому

    thank you!

  • @dotnetfullstack3217
    @dotnetfullstack3217 Рік тому

    Excellent explanation and very good narration.

  • @wildann492
    @wildann492 Рік тому

    is there example for login?

  • @AbarnaM-r4v
    @AbarnaM-r4v Рік тому

    Thank You

  • @neerajdeori1057
    @neerajdeori1057 Рік тому

    You are best sir

  • @aqibkhan-fn3tc
    @aqibkhan-fn3tc Рік тому

    Great video!!!!
    👍👍👍

  • @renishsalakhana5603
    @renishsalakhana5603 Рік тому

    please tell how id will auto generated ??

    • @NihiraTechiees
      @NihiraTechiees  Рік тому +1

      It's default feature in json server

    • @renishsalakhana5603
      @renishsalakhana5603 Рік тому +1

      @@NihiraTechiees from the based API it will change right?

    • @NihiraTechiees
      @NihiraTechiees  Рік тому +1

      Yes bro . First field should be named with id. If you providing some value it will consider but the value should be unique. If you not provided value then it will generate.
      Still Json server is fake api used for only study and development. Only

    • @renishsalakhana5603
      @renishsalakhana5603 Рік тому +1

      @@NihiraTechiees let me try brother will discard disable attribute input field named with ID and see , will try giving unique value to it

    • @renishsalakhana5603
      @renishsalakhana5603 Рік тому

      bro I hope that whatever unique value I given to the ID field will store same as given in db.json file right after make above changes ?

  • @Dev-Phantom
    @Dev-Phantom Рік тому

    cool

  • @vinnnduri7509
    @vinnnduri7509 Рік тому

    This is the best React CRUD operations video have ever found

    • @NihiraTechiees
      @NihiraTechiees  Рік тому

      Thanks

    • @KTAOKGeethika
      @KTAOKGeethika Рік тому

      How we use this by check box??

    • @KTAOKGeethika
      @KTAOKGeethika Рік тому

      By using checkbox we have to do create, edit, delete operations??

    • @NihiraTechiees
      @NihiraTechiees  Рік тому

      It's based on your requiremrnt

    • @KTAOKGeethika
      @KTAOKGeethika Рік тому

      @@NihiraTechiees yes but I don't know how to apply so I asked you to help me with this

  • @FarhanDeveloper2067
    @FarhanDeveloper2067 Рік тому

    👍👍