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

Поделиться
HTML-код
  • Опубликовано: 3 апр 2021
  • 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/piyush-eon/Reactjs...
    Live Site -
    intuitive-quiz-hub.netlify.app/
    React Router DOM Tutorial -
    • React Router Dom [ Ful...
    How to Shuffle array-
    flaviocopes.com/how-to-shuffl...
    Dictionary API -
    Website - opentdb.com/api_config.php
    API - `opentdb.com/api.php?amount=10${category &&`&category=${category}`}${difficulty && `&difficulty=${difficulty}`}&type=multiple`
    Material UI -
    material-ui.com/
    Learn React From Scratch -
    • React JS Workshop Day ...

Комментарии • 134

  • @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 2 года назад +7

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

  • @merunus8556
    @merunus8556 2 года назад

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

  • @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

  • @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.

  • @singhgagandeep955
    @singhgagandeep955 2 года назад

    greate buddy keep it up thanks for projects

  • @matthiao1
    @matthiao1 2 года назад

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

  • @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

  • @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!

  • @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!

  • @lakshmipravallika5410
    @lakshmipravallika5410 9 месяцев назад

    it was wonderful and thank you so much

  • @Jawad_Siddiqui
    @Jawad_Siddiqui 2 года назад

    Amazing content buddy! Thanks

  • @rodolforaquion166
    @rodolforaquion166 2 года назад

    Very great tutorial and humorous!

  • @sachinlingwal2325
    @sachinlingwal2325 2 года назад

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

  • @noorb374
    @noorb374 Год назад

    hi sir, plz bring more projects , you are amazing

  • @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.

  • @magic.pencil2.0
    @magic.pencil2.0 2 года назад

    It was Awesome . Thank You sir

  • @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?????

  • @scorpionsdragons8275
    @scorpionsdragons8275 Год назад

    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

  • @priyasarath6926
    @priyasarath6926 10 месяцев назад

    it's really super. thanks bro...

  • @christianonyango7460
    @christianonyango7460 2 года назад

    Be blessed brother, you are awesome

  • @svtbts8176
    @svtbts8176 2 года назад +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?

  • @ashishnayak2666
    @ashishnayak2666 Год назад

    Awesome brother 👏

  • @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.

  • @teshell8317
    @teshell8317 2 года назад

    Thanks for the tutorial

  • @harshtiwari2150
    @harshtiwari2150 2 года назад +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  2 года назад +1

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

    • @harshitagupta4730
      @harshitagupta4730 Год назад

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

    • @harshtiwari2150
      @harshtiwari2150 Год назад

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

    • @shinpaingmin603
      @shinpaingmin603 9 месяцев назад

      Thank you so much. I was thinking about that.

  • @arikxl
    @arikxl Год назад +2

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

  • @utkarshverma2604
    @utkarshverma2604 3 года назад

    bhai maza aa gya bhai

  • @stuartk716
    @stuartk716 2 года назад

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

  • @shinpaingmin603
    @shinpaingmin603 9 месяцев назад

    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?

  • @glima1
    @glima1 Год назад

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

  • @adhargupta3441
    @adhargupta3441 2 года назад +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😑

  • @AkashSharma-fw4vw
    @AkashSharma-fw4vw 2 года назад

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

  • @rajatgupta9743
    @rajatgupta9743 Год назад

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

  • @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

  • @mayankarote4750
    @mayankarote4750 2 года назад

    Thank You

  • @anushasrivastava6620
    @anushasrivastava6620 7 месяцев назад

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

  • @ayushsaxena5004
    @ayushsaxena5004 3 года назад

    Thank bro

  • @krishnaprasad_k
    @krishnaprasad_k 2 года назад +1

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

  • @PIYUSH-lz1zq
    @PIYUSH-lz1zq 2 года назад +1

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

  • @salmanshakya
    @salmanshakya Год назад

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

  • @rajalakshmiramasamy8643
    @rajalakshmiramasamy8643 Год назад

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

  • @527dharani3
    @527dharani3 Год назад

    How to do write a edit an assessment using UI

  • @mindcrazy9772
    @mindcrazy9772 2 года назад +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  2 года назад +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 2 года назад

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

  • @avinashjaiswal7495
    @avinashjaiswal7495 Год назад

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

  • @alejandrozuniga1126
    @alejandrozuniga1126 2 года назад +1

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

    • @RoadsideCoder
      @RoadsideCoder  2 года назад +1

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

    • @alejandrozuniga1126
      @alejandrozuniga1126 2 года назад

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

  • @n7pankake236
    @n7pankake236 2 года назад

    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  2 года назад

      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 2 года назад

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

  • @kamilaltug5670
    @kamilaltug5670 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..

    • @kamilaltug5670
      @kamilaltug5670 3 года назад

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

  • @vicentepaiva30
    @vicentepaiva30 2 года назад

    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  2 года назад

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

    • @ahmadswalih439
      @ahmadswalih439 Год назад

      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

  • @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 RUclips.

  • @dipankarchetia843
    @dipankarchetia843 2 года назад

    hey bro why my handleCheck function is not working please explain

  • @muhammadosama4593
    @muhammadosama4593 2 года назад

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

  • @Enjoyablewalks
    @Enjoyablewalks Год назад

    Do u host online training sessions

    • @RoadsideCoder
      @RoadsideCoder  Год назад +1

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

  • @aditiojha7026
    @aditiojha7026 2 года назад

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

    • @RoadsideCoder
      @RoadsideCoder  2 года назад

      I will bring the firebase tutorial soon!

  • @keshavashourie1865
    @keshavashourie1865 2 года назад +1

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

  • @shridharsarraf2188
    @shridharsarraf2188 2 года назад

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

    • @RoadsideCoder
      @RoadsideCoder  2 года назад

      U need to manually import it

    • @ravichaudhary474
      @ravichaudhary474 2 года назад

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

  • @umangapokharel0908
    @umangapokharel0908 Год назад

    whats your vs theme piyush

  • @ayeshakhanzada4005
    @ayeshakhanzada4005 2 года назад

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

    • @RoadsideCoder
      @RoadsideCoder  2 года назад

      What is it? Contact me on instagram @RoadsideCoder

  • @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 = {}"

  • @yaduveersinghyadav9005
    @yaduveersinghyadav9005 2 года назад

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

    • @RoadsideCoder
      @RoadsideCoder  2 года назад

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

    • @pranatakasih
      @pranatakasih Год назад

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

  • @Someone2233
    @Someone2233 2 года назад

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

    • @RoadsideCoder
      @RoadsideCoder  2 года назад

      Try to compare with my code. Link in description

    • @Someone2233
      @Someone2233 2 года назад

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

    • @RoadsideCoder
      @RoadsideCoder  2 года назад

      @@Someone2233 contact me on instagram @RoadsideCoder

  • @Subramanian403
    @Subramanian403 2 года назад

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

    • @Subramanian403
      @Subramanian403 2 года назад

      How do I remove those?

    • @RoadsideCoder
      @RoadsideCoder  2 года назад

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

    • @Subramanian403
      @Subramanian403 2 года назад

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

    • @ahmadswalih439
      @ahmadswalih439 Год назад

      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

  • @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?

  • @edutecharena8323
    @edutecharena8323 2 года назад

    CAN I GET A ZIP file

  • @edutecharena8323
    @edutecharena8323 2 года назад

    Where is the html file

  • @hellomikey4868
    @hellomikey4868 2 года назад

    spongebob squarepants

  • @learnwithhaykaz
    @learnwithhaykaz Год назад

    "oops!" sounds too much.

  • @sauravraj1488
    @sauravraj1488 11 месяцев назад +1

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