React.js Quiz | Set-1Last Updated : 27 Sep, 2023ReadDiscussCoursesReact.js Quiz | Set-1Please wait while the activity loads.If this activity does not load, try refreshing your browser. Also, this page requires javascript. Please visit using a browser with javascript enabled.If loading fails, click here to try againQuestion 1Which of the following command is used to create react-js-app ?npx create-react-app appnamenpm install create-react-appnpx install create-react-app -ginstall - l create-react-appReact.js Quiz | Set-1 Discuss itQuestion 1-Explanation: The correct syntax for installing react app is npx create-react-app app name where app name is the name of the app you want to create.Question 2In React.js which one of the following is used to create a class for Inheritance ?CreateExtendsInheritsDeleteReact.js Quiz | Set-1 Discuss itQuestion 2-Explanation: The meaning of Extends in react.js is to create a class for the Inheritance So the correct answer is Extend.Question 3What is the default port number in which the application run ?3000808050003030React.js Quiz | Set-1 Discuss itQuestion 3-Explanation: The default port number in which react application runs are 3000.Question 4Which of the following valid component return type of React ?2513React.js Quiz | Set-1 Discuss itQuestion 4-Explanation: The only valid component return type of React. The return type in React is by render() function.Question 5Which of the following is a way to handle data in React.js ?State & PropsServices & ComponentsState & ServicesState & ComponentReact.js Quiz | Set-1 Discuss itQuestion 5-Explanation: State and Props are ways to handle data in React.js where the state is mutable and props are unchangeable.Question 6Which of the following is must for the API in React.js ?SetinitialComponentrenderComponentrenderAll of the aboveReact.js Quiz | Set-1 Discuss itQuestion 6-Explanation: The renderComponent is not a function that is used as API for the React.js.Question 7Which of the following is true regarding Babel ?CompilerTranspilarBoth of the aboveNone of the aboveReact.js Quiz | Set-1 Discuss itQuestion 7-Explanation: Babel is both compiler and Transpiler which is used to run the react.js application.Question 8In React.js, how we can pass the data from one component to another in React.js ?SetStateRender with argumentsPropsPropTypesReact.js Quiz | Set-1 Discuss itQuestion 8-Explanation: Props can help to pass the data from one component from another in react.js. Props are un-mutable so that they cant be changed.Question 9Which of the following function is true about changing the state in React.js ?this.State{}this.setStatethis.setChangeStateAll of the aboveReact.js Quiz | Set-1 Discuss itQuestion 9-Explanation: The this.setState is used for changing the state in React.js whenever the state changes in react then it re-render the component in the browser.Question 10Which of the following method is true about referring parent class in React.js ?self()inherits()this()super()React.js Quiz | Set-1 Discuss itQuestion 10-Explanation: The super() is a method in which referring the parent class in react.js. It is the way for calling the constructor in React.js. 12 There are 15 questions to complete.You have completedquestionsquestionYour accuracy isCorrectWrongPartial-CreditYou have not finished your quiz. If you leave this page, your progress will be lost.Correct AnswerYou SelectedNot AttemptedFinal Score on QuizAttempted Questions CorrectAttempted Questions WrongQuestions Not AttemptedTotal Questions on QuizQuestion DetailsResultsDateScoreHintTime allowedminutessecondsTime usedAnswer Choice(s) SelectedQuestion Text All doneNeed more practice!Keep trying!Not bad!Good work!Perfect!