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
|
16771
|
April 20, 2024
|
How can we access the individual elements or values of a prop which is an array or object?
|
|
5
|
12966
|
September 29, 2021
|
Is using a variable to set an attribute better practice than using object properties to set attributes?
|
|
7
|
11798
|
March 14, 2023
|
Can we access state properties using bracket notation?
|
|
2
|
10012
|
January 19, 2021
|
What is an HTML-like JSX element?
|
|
2
|
9782
|
May 2, 2020
|
What does JSON.stringify do?
|
|
6
|
23488
|
September 5, 2023
|
Why sometimes import has {} and sometimes doesn't?
|
|
4
|
13105
|
November 14, 2020
|
What happens if I don't use this when referencing a method from inside a class?
|
|
13
|
8033
|
October 22, 2022
|
When should I use logic inside of render vs logic inside of the class declaration?
|
|
3
|
11254
|
November 21, 2020
|
Is the ReactDOM render() method the same as the component render() method?
|
|
0
|
10685
|
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
|
19088
|
May 25, 2024
|
Why don't we set the event listener attribute value to a function call?
|
|
13
|
14456
|
January 3, 2024
|
Can I inject other programming languages besides JavaScript into JSX?
|
|
12
|
17046
|
September 22, 2023
|
Can I call multiple event handlers in response to a single event?
|
|
19
|
36523
|
March 17, 2023
|
Why don't I need a ReactDOM.render() for each component?
|
|
7
|
18822
|
March 16, 2022
|
Can we return multiple elements in the render function?
|
|
10
|
20565
|
February 10, 2022
|
When should I use an if statement, a ternary operator, or the && operator?
|
|
1
|
11803
|
June 30, 2024
|
Can I use .forEach() to create a list of JSX elements?
|
|
6
|
68653
|
December 11, 2023
|
Why do I get errors when I pass the method with () to the attribute?
|
|
6
|
4573
|
May 7, 2022
|
What if the specified container already has contents when rendering to it?
|
|
5
|
7977
|
April 23, 2021
|
Why would we want to use variables to set a component's attributes?
|
|
0
|
7059
|
March 23, 2019
|
When should I assign a variable to a JavaScript expression that I want to use in a JSX expression?
|
|
0
|
10449
|
February 17, 2019
|
Should we always set defaultProps for every prop value?
|
|
0
|
10856
|
January 29, 2019
|
Do controlled and uncontrolled just mean stateless and stateful?
|
|
2
|
6824
|
September 21, 2023
|
Can we pass multiple event handlers as props and choose a specific one to attach to a child component?
|
|
2
|
12988
|
July 17, 2023
|
How should component classes be named?
|
|
8
|
6665
|
April 7, 2023
|
Can I use self-closing tag syntax for any HTML elements I use in JSX?
|
|
7
|
10939
|
February 17, 2023
|
Can we pass the entire state object to the child component?
|
|
4
|
9782
|
January 30, 2022
|
Why would I use React.createElement() instead of JSX?
|
|
10
|
17960
|
November 29, 2021
|