Identify the correct definition of the code super(props).
A. Call a class parent constructor and pass props as an argument
B. Initialize class state with props
C. Prepare a JSX element
D. Initialize a function-based React component - A. Call a class parent constructor and
pass props as an argument
,Select the code that binds a form control value to a class state property value.
A. handleAddButtonClick
B. key = {index}
C. value = {this.state.text}
D. .filter() - C. value = {this.state.text}
The code { data } is equivalent to { data: data }.
A. True
B. False - A. True
The array filter() method creates an array filled with all array elements that pass a test
(provided as a function).
A. True
B. False - A. True
Identify the correct JSX comment syntax.
A. /* */
B. {/* */}
C. { }
D. // - B. {/* */}
Identify the correct definition of transpiling.
A. Converting source code to an executable file
B. Execution of source code through an interpreter program
C. Converting source code from one language or version to another language or version
D. Offloading of source from local resources to the cloud - C. Converting source code
from one language or version to another language or version
The fundamental ReactJS paradigm is component state changes lead to visual element
changes.
A. True
B. False - A. True
https://reactjs.org/
JSX does NOT support self-closing tags.
A. True
B. False - B. False
, https://reactjs.org/docs/introducing-jsx.html
Function-based React components MUST implement a constructor() method.
Identify the correct JSX attribute to associate a CSS class with a JSX div element.
A. id
B. class
C. classname
D. className - D. className
Given the following array definitions, identify the correct syntax to populate the empty
array.
let d = ["A ", "B "];
let n = [];
A. d.map((e, i) => n.push(i + ":" + e));
B. d.map(function (e, i) { n.push(i + ":" + e); });
C. Both A and B would populate the empty array
D. Neither A or B would populate the empty array - C. Both A and B would populate the
empty array
https://www.w3schools.com/jsref/jsref_map.asp
1 function Greeting(props) {
2 const name = this.props.name ? this.props.name : "Guest";
3 return (
4 <h1>Hello name</h1>
5 <h2>How are you?</h2>
6 );
7}
Identify the problem on line #2.
A. const should be replaced with let
B. The ternary operator is : ?
C. Inclusion of this instance object is incorrect
D. "Guest" must be 'Guest' - C. Inclusion of this instance object is incorrect
1 function Greeting(props) {
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller chareiezekiel. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $29.99. You're not tied to anything after your purchase.