About the React.js FAQ category
|
|
0
|
959
|
December 30, 2017
|
Why can I use a ternary operator inside a JSX expression but not an if statement?
|
|
13
|
16653
|
April 20, 2024
|
How can we access the individual elements or values of a prop which is an array or object?
|
|
5
|
12882
|
September 29, 2021
|
Is using a variable to set an attribute better practice than using object properties to set attributes?
|
|
7
|
11728
|
March 14, 2023
|
Can we access state properties using bracket notation?
|
|
2
|
10004
|
January 19, 2021
|
What is an HTML-like JSX element?
|
|
2
|
9754
|
May 2, 2020
|
What does JSON.stringify do?
|
|
6
|
23420
|
September 5, 2023
|
Why sometimes import has {} and sometimes doesn't?
|
|
4
|
13022
|
November 14, 2020
|
What happens if I don't use this when referencing a method from inside a class?
|
|
13
|
8028
|
October 22, 2022
|
When should I use logic inside of render vs logic inside of the class declaration?
|
|
3
|
11211
|
November 21, 2020
|
Is the ReactDOM render() method the same as the component render() method?
|
|
0
|
10620
|
January 3, 2019
|
Are there any other HTML attributes that are reserved keywords in JavaScript that I wont be able to use in JSX?
|
|
8
|
18984
|
May 25, 2024
|
Why don't we set the event listener attribute value to a function call?
|
|
13
|
14364
|
January 3, 2024
|
Can I inject other programming languages besides JavaScript into JSX?
|
|
12
|
16948
|
September 22, 2023
|
Can I call multiple event handlers in response to a single event?
|
|
19
|
36373
|
March 17, 2023
|
Why don't I need a ReactDOM.render() for each component?
|
|
7
|
18788
|
March 16, 2022
|
Can we return multiple elements in the render function?
|
|
10
|
20436
|
February 10, 2022
|
When should I use an if statement, a ternary operator, or the && operator?
|
|
1
|
11731
|
June 30, 2024
|
Can I use .forEach() to create a list of JSX elements?
|
|
6
|
68204
|
December 11, 2023
|
Why do I get errors when I pass the method with () to the attribute?
|
|
6
|
4569
|
May 7, 2022
|
What if the specified container already has contents when rendering to it?
|
|
5
|
7975
|
April 23, 2021
|
Why would we want to use variables to set a component's attributes?
|
|
0
|
7023
|
March 23, 2019
|
When should I assign a variable to a JavaScript expression that I want to use in a JSX expression?
|
|
0
|
10407
|
February 17, 2019
|
Should we always set defaultProps for every prop value?
|
|
0
|
10819
|
January 29, 2019
|
Do controlled and uncontrolled just mean stateless and stateful?
|
|
2
|
6803
|
September 21, 2023
|
Can we pass multiple event handlers as props and choose a specific one to attach to a child component?
|
|
2
|
12937
|
July 17, 2023
|
How should component classes be named?
|
|
8
|
6629
|
April 7, 2023
|
Can I use self-closing tag syntax for any HTML elements I use in JSX?
|
|
7
|
10866
|
February 17, 2023
|
Can we pass the entire state object to the child component?
|
|
4
|
9769
|
January 30, 2022
|
Why would I use React.createElement() instead of JSX?
|
|
10
|
17809
|
November 29, 2021
|