Quiz App in React JS with 22 Categories | Material UI | React Beginners Project | Trivia API

Поділитися
Вставка
  • Опубліковано 5 лют 2025
  • Lets Create a Quiz App in React JS and Material UI with support of over 22 Categories.
    If any questions, ask me here-
    / roadsidecoder
    Source Code -
    github.com/piy...
    Live Site -
    intuitive-quiz...
    React Router DOM Tutorial -
    • React Router Dom [ Ful...
    How to Shuffle array-
    flaviocopes.co...
    Dictionary API -
    Website - opentdb.com/ap...
    API - `opentdb.com/ap...{category &&`&category=${category}`}${difficulty && `&difficulty=${difficulty}`}&type=multiple`
    Material UI -
    material-ui.com/
    Learn React From Scratch -
    • React JS Workshop Day ...

КОМЕНТАРІ • 137

  • @RoadsideCoder
    @RoadsideCoder  3 роки тому +2

    Hey Everyone, Make sure you're using Material UI version 4 - v4.mui.com
    Join our new Telegram Group 🔥🔥
    t.me/joinchat/4kdh0elulIwwY2M1

  • @anubhapant5227
    @anubhapant5227 3 роки тому +7

    It's an amazing app. Also, the way you covered all the things is wonderful. Keep bringing such types of projects on react.

  • @SCRIPTSAG
    @SCRIPTSAG 3 роки тому

    Ekdum real product lag rha hai Aisha bnaya hai apne pahel mai khud se try kerta hu nhi hoga to mai apka dekhunga jaruri

    • @RoadsideCoder
      @RoadsideCoder  3 роки тому

      Thanks man, and definitely try on your own first.. Will help u a lot!

  • @harshtiwari2150
    @harshtiwari2150 3 роки тому +3

    hey piyush i noticed that you used href in "Quit" and "Go to homepage" button instead we can use history.push on onclick as href will reload the page as react is single page app so we should avoid reloading it and btw it is an awesome video with an awesome explanation 😍😍

    • @RoadsideCoder
      @RoadsideCoder  3 роки тому +1

      Yeah definitely man! Great observation and thanks for the appreciation! ❤️

    • @harshitagupta4730
      @harshitagupta4730 2 роки тому

      If I am using history.push (now navigate) on onClick then app is not getting refreshed score is also not getting reset

    • @harshtiwari2150
      @harshtiwari2150 2 роки тому

      @@harshitagupta4730 on onclick again set the state it will refresh without reloading

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

      Thank you so much. I was thinking about that.

  • @riahiyassine7703
    @riahiyassine7703 2 роки тому +1

    My friend, you are awesome. I thank you so much because this is what I'm looking for using react-native but you use it inside react ...but it's good also since both are using the same logic

  • @himanshuraj254
    @himanshuraj254 3 роки тому

    Yesterday i search for Reactjs Quiz app and Today god listen me.
    Thanks Man😊

    • @RoadsideCoder
      @RoadsideCoder  3 роки тому +1

      Haha, Glad to hear that man! Hope you enjoy the tutorial.

  • @sagarsain896
    @sagarsain896 3 роки тому +1

    Thanks a lot sir, Appreciate your efforts for making such a great project videos. I have done the entire project and I did not get stuck any point, each and everything has taught properly. ✔✔✔✔

    • @RoadsideCoder
      @RoadsideCoder  3 роки тому

      Wow that's great Sagar! Glad that I could help.

  • @scorpionsdragons8275
    @scorpionsdragons8275 2 роки тому

    II added the functionality to add the record in Local Storage and in UseEffect it takes the record and shows it on the screen and at the end of the game there is an if that if the record is greater than the score it adds the record in Local Storage

  • @khandoor7228
    @khandoor7228 3 роки тому +1

    Dude these tutorials are fantastic! thank you please keep going.

    • @RoadsideCoder
      @RoadsideCoder  3 роки тому +1

      Your fantastic comments motivate me to make these fantastic tutorials

  • @samruddhiarekar5377
    @samruddhiarekar5377 2 роки тому +2

    Sir useHistory v5 ka h toh abhi m useNavigate use kiya bt phir bhi code proper execute nahi ho raha h?????

  • @ashishnayak2666
    @ashishnayak2666 2 роки тому

    Awesome brother 👏

  • @arikxl
    @arikxl 2 роки тому +2

    Great tutorials!! I used the npm package "html-entities" to fix the "/'/quotes/&/;/# bug.

  • @merunus8556
    @merunus8556 2 роки тому

    This is amazing, so much new and useful information, well done brother!

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

    it's really super. thanks bro...

  • @singhgagandeep955
    @singhgagandeep955 2 роки тому

    greate buddy keep it up thanks for projects

  • @rodolforaquion166
    @rodolforaquion166 3 роки тому

    Very great tutorial and humorous!

  • @sachinlingwal2325
    @sachinlingwal2325 3 роки тому

    thank u so much sir ur explaination is very good i have done with this project .....please continue more projects like this

  • @utkarshverma2604
    @utkarshverma2604 3 роки тому

    bhai maza aa gya bhai

  • @svtbts8176
    @svtbts8176 3 роки тому +1

    loved it thanks a lot!!! but i do not understand the 'useEffect(()=>if(!name)...etc' in the Result.js page, like why do you need it?

  • @matthiao1
    @matthiao1 3 роки тому

    Thank you so much for this video. I learned a lot from it.

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

    in my data object question array length is zero can you help me with this

  • @neenakhan4326
    @neenakhan4326 3 роки тому

    good tutorial, concepts are explained well & in a simple manner, thanks :)

    • @RoadsideCoder
      @RoadsideCoder  3 роки тому

      Glad you liked it! Checkout my mern stack series that's currently going on!

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

    it was wonderful and thank you so much

  • @magic.pencil2.0
    @magic.pencil2.0 3 роки тому

    It was Awesome . Thank You sir

  • @adhargupta3441
    @adhargupta3441 3 роки тому +1

    I don't know why there is issue with pushState in this app as well as in your crypto app??? what's wrong with pushState
    ok I got it use only push("/quiz")
    but crpypto app problem is still unsolved😑

  • @Jawad_Siddiqui
    @Jawad_Siddiqui 3 роки тому

    Amazing content buddy! Thanks

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

    Hello, sir. Your tutorial is amazing but I have something to ask you. I answered questions in quiz page and the result page will show my results. But when we click to "GO BACK HOMEPAGE", why the score sets to initial state which is 0? Score was in the higher level of all the components and pages. So, why it is possible to set to 0 even there is no set to initial state in home page? Is it because of material ui button which is used with href?

  • @mindcrazy9772
    @mindcrazy9772 3 роки тому +1

    First of all, I really appreciated your effort to do this video. After following this video and i make a copy from your code I got the same mistake in your code it says Cannot read property 'category' of undefined whenever i choose Mathematics and the level is easy. However, on other category is working fine.. Any thought about this bug. Thank You so Much

    • @RoadsideCoder
      @RoadsideCoder  3 роки тому +1

      Yeah maybe that must be the API Bug, which is out of our control, you can remove the mathematics category in that case.

    • @mindcrazy9772
      @mindcrazy9772 3 роки тому

      @@RoadsideCoder Thank you sir for your replay I really apreciated that.

  • @noorb374
    @noorb374 2 роки тому

    hi sir, plz bring more projects , you are amazing

  • @Trending_Songs_videos
    @Trending_Songs_videos 2 роки тому

    hey i am selecting Category but when i start quiz category show random not that what i selected why ??

  • @christianonyango7460
    @christianonyango7460 3 роки тому

    Be blessed brother, you are awesome

  • @PIYUSH-lz1zq
    @PIYUSH-lz1zq 3 роки тому +1

    If we want to add user customize questions what would be the approach to do that ?? Backend chaiye hoga kya ??

  • @glima1
    @glima1 2 роки тому

    How can i solve the problem of rendering again the currentQuestion in class component?

  • @krishnaprasad_k
    @krishnaprasad_k 2 роки тому +1

    Brother, please make a video about how redirect to home page , when refresh is clicked in react js.

  • @stuartk716
    @stuartk716 2 роки тому

    hello, my handle shuffle(questions[currQues]?.correct_answer,
    ...questions[currQues]?.incorrect_answer) function is showing an error...please help

  • @yaduveersinghyadav9005
    @yaduveersinghyadav9005 3 роки тому

    Why i cannot see my questions in result:Array(10) ???? at 57:23

    • @RoadsideCoder
      @RoadsideCoder  3 роки тому

      Maybe because API is not getting called properly. Can u send ur git repo

    • @pranatakasih
      @pranatakasih 2 роки тому

      @@RoadsideCoder hey, i get the same problem in my console only show undefined. is there any solution?

  • @AkashSharma-fw4vw
    @AkashSharma-fw4vw 2 роки тому

    How can i show all the questions and options on final score page with selected options ??

  • @mustafatahir5240
    @mustafatahir5240 2 роки тому

    I am not been able to show options in my console....
    And facing this error:
    You may need an appropriate loader to handle this file type ....
    Plzzzz help

  • @salmanshakya
    @salmanshakya 2 роки тому

    help : when i press "next question", the question pops up for a second and imeediately goes to the home page again

  • @alexinho2708
    @alexinho2708 2 роки тому

    @material-ui/core@4.12.4 requires a peer of react-dom@^16.8.0 || ^17.0.0 but none is installed. You must install peer dependencies yourself. So I cannot do this with React v18.1.0, right? Looks like I should use an older version of react.

  • @AkashPatel-ky5fp
    @AkashPatel-ky5fp 7 місяців тому

    Heyy,
    bhai ye Api work nahi karti he
    to kya kare ab??

  • @n7pankake236
    @n7pankake236 3 роки тому

    So what if I like the format but I wanna use my own questions ? because from what I saw that just grabs gobal questions from a server from another page, but what if I wanna use my own question?

    • @RoadsideCoder
      @RoadsideCoder  3 роки тому

      Then you will have to build your own server and api to serve from backend. Or can also prepare set of dummy data in frontend.

    • @n7pankake236
      @n7pankake236 3 роки тому

      @@RoadsideCoder ah I see, thanks for the fast reply

  • @teshell8317
    @teshell8317 3 роки тому

    Thanks for the tutorial

  • @alejandrozuniga1126
    @alejandrozuniga1126 3 роки тому +1

    Excellent video!! Thanks!!
    Could you please build it with user authentications i.e.sign in, sign up, forgot password, etc?

    • @RoadsideCoder
      @RoadsideCoder  3 роки тому +1

      Hey, I already have. Please checkout my mern stack series with redux.

    • @alejandrozuniga1126
      @alejandrozuniga1126 3 роки тому

      Thanks!! you have it with a note App, should it work the same with the quiz app?

  • @samruddhiarekar5377
    @samruddhiarekar5377 2 роки тому

    Hello sir , i get the switch error , imported as switch was not found ??? What will i do???

    • @RoadsideCoder
      @RoadsideCoder  2 роки тому

      Can you elaborate the issue? Reach out to me on instagram @RoadsideCoder.

    • @preetikabra5737
      @preetikabra5737 2 роки тому

      @@RoadsideCoder yes I am also getting it pls answer

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

      @@preetikabra5737 Instead of switch use "Routes", and pass the component as "element = {}"

  • @avinashjaiswal7495
    @avinashjaiswal7495 2 роки тому

    {options && options.map((i) => {i} } not fatching not working

  • @shridharsarraf2188
    @shridharsarraf2188 3 роки тому

    Bro my Switch is getting imported from material ui core and not react-router-dom, why so?

    • @RoadsideCoder
      @RoadsideCoder  3 роки тому

      U need to manually import it

    • @ravichaudhary474
      @ravichaudhary474 3 роки тому

      In latest version of react-router-dom switch is no more available use Routes instead and exact property is not needed anymore

  • @Enjoyablewalks
    @Enjoyablewalks 2 роки тому

    Do u host online training sessions

    • @RoadsideCoder
      @RoadsideCoder  2 роки тому +1

      You can book a call with me here -
      Topmate.io/roadsidecoder

  • @527dharani3
    @527dharani3 2 роки тому

    How to do write a edit an assessment using UI

  • @eMeN903
    @eMeN903 3 роки тому +1

    Sir,
    How to set timer for the quiz?

    • @RoadsideCoder
      @RoadsideCoder  3 роки тому

      With setTimeout. Try to search countdown timer with react on UA-cam.

  • @sercanyildirimtugcann
    @sercanyildirimtugcann 3 роки тому +1

    Bro, you promised to create inshorts react native clone. Did you have any progress on it? It would be great! Plus, any more quiz survey video using survey.js? Thanks!!

    • @RoadsideCoder
      @RoadsideCoder  3 роки тому +1

      Yeah, I will mate.. Currently planning on starting MERN Stack series.. After that React Native..

    • @sercanyildirimtugcann
      @sercanyildirimtugcann 3 роки тому

      @@RoadsideCoder Really appreciate! Best greetings from New York!

  • @muhammadosama4593
    @muhammadosama4593 3 роки тому

    After calling an API, I am not getting any data resulted array is empty like result[0]

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

    I have doubts in Question.js line no.59. can anybody explain that??

  • @Subramanian403
    @Subramanian403 3 роки тому

    why are some questions and options having some 'T in between?

    • @Subramanian403
      @Subramanian403 3 роки тому

      How do I remove those?

    • @RoadsideCoder
      @RoadsideCoder  3 роки тому

      @@Subramanian403 it's symbols, u need to parse them

    • @Subramanian403
      @Subramanian403 3 роки тому

      @@RoadsideCoder Oh but how? Is there any function to parse them?? And thanks for the video.. Loved it !!

    • @ahmadswalih439
      @ahmadswalih439 2 роки тому

      there is a simple way to handle it .
      in the qustions h2 tag add this :
      and for the optons button also add this :
      handleCheck(i)}
      className={`singleOption ${selected && handleSelect(i)}`}
      disabled={selected}
      key={i}
      dangerouslySetInnerHTML={{
      __html: i,
      }}
      >
      this will solve the problem , atleast solved mine

  • @vicentepaiva30
    @vicentepaiva30 3 роки тому

    Hello, congratulations for this app, but how resolve the problem with the questions that appear with #quot and #39? did you see that? maybe using slice or filter ?

    • @RoadsideCoder
      @RoadsideCoder  3 роки тому

      They are symbols, You need to use some library to decode them. Try to google

    • @ahmadswalih439
      @ahmadswalih439 2 роки тому

      there is a simple way to handle it .
      in the qustions h2 tag add this :
      and for the optons button also add this :
      handleCheck(i)}
      className={`singleOption ${selected && handleSelect(i)}`}
      disabled={selected}
      key={i}
      dangerouslySetInnerHTML={{
      __html: i,
      }}
      >
      this will solve the problem , atleast solved mine

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

    whats your vs theme piyush

  • @keshavashourie1865
    @keshavashourie1865 3 роки тому +1

    After calling Api in console log i am not getting any data in console , i tried using the api from GIT repository too.

  • @Someone2233
    @Someone2233 3 роки тому

    Why do I get Invalid Hook error everytime... Unable to fix it.

    • @RoadsideCoder
      @RoadsideCoder  3 роки тому

      Try to compare with my code. Link in description

    • @Someone2233
      @Someone2233 3 роки тому

      I checked every line... It's same... Can it be due to some system or browser problem?

    • @RoadsideCoder
      @RoadsideCoder  3 роки тому

      @@Someone2233 contact me on instagram @RoadsideCoder

  • @aditiojha7026
    @aditiojha7026 3 роки тому

    Sir how can I use firebase for storing data of this quiz app

    • @RoadsideCoder
      @RoadsideCoder  3 роки тому

      I will bring the firebase tutorial soon!

  • @dipankarchetia843
    @dipankarchetia843 3 роки тому

    hey bro why my handleCheck function is not working please explain

  • @mayankarote4750
    @mayankarote4750 3 роки тому

    Thank You

  • @ayeshakhanzada4005
    @ayeshakhanzada4005 2 роки тому

    Hii I'm getting error in ./header.css files

    • @RoadsideCoder
      @RoadsideCoder  2 роки тому

      What is it? Contact me on instagram @RoadsideCoder

  • @chimaobiezeobidi6065
    @chimaobiezeobidi6065 2 роки тому

    Nice video sir,
    Uncaught TypeError: (intermediate value)(intermediate value)(intermediate value) is not iterable
    I get this when I spread the correct_ansswer

    • @chimaobiezeobidi6065
      @chimaobiezeobidi6065 2 роки тому

      I have fixed it. I just need to use conditional statement and spread the incorrect answers instead of the correct answer

    • @merunus8556
      @merunus8556 2 роки тому

      @@chimaobiezeobidi6065 How exactly have you fixed it?

    • @annm2855
      @annm2855 2 роки тому

      @@merunus8556 first spread the incorrect_ans, then add correct_ans to it.
      E.g
      setOptions(questions && listOptions([... questions [currentquestions]?.incorrect_ans, questions[currentquestions]?.correct_ans])
      Do you understand it now?

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

    Rafce dose not work for me 😢😢😢

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

      ua-cam.com/video/mseEeZMQFfM/v-deo.html&lc=Ugwcotigu5L_v__eFNJ4AaABAg

  • @ayushsaxena5004
    @ayushsaxena5004 3 роки тому

    Thank bro

  • @edutecharena8323
    @edutecharena8323 3 роки тому

    Where is the html file

  • @edutecharena8323
    @edutecharena8323 3 роки тому

    CAN I GET A ZIP file

  • @mikeyonthedrums
    @mikeyonthedrums 2 роки тому

    spongebob squarepants

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

    Bhai tu please thoda aur explain kiya kr bhut kam explain kr rha

  • @editingwithai
    @editingwithai 2 роки тому

    "oops!" sounds too much.