-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdb.json
More file actions
139 lines (139 loc) · 4.02 KB
/
db.json
File metadata and controls
139 lines (139 loc) · 4.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
{
"questions": [
{
"question": "Which is the most popular JavaScript framework?",
"options": ["Angular", "React", "Svelte", "Vue"],
"correctOption": 1,
"points": 10
},
{
"question": "Which company invented React?",
"options": ["Google", "Apple", "Netflix", "Facebook"],
"correctOption": 3,
"points": 10
},
{
"question": "What's the fundamental building block of React apps?",
"options": ["Components", "Blocks", "Elements", "Effects"],
"correctOption": 0,
"points": 10
},
{
"question": "What's the name of the syntax we use to describe the UI in React components?",
"options": ["FBJ", "Babel", "JSX", "ES2015"],
"correctOption": 2,
"points": 10
},
{
"question": "How does data flow naturally in React apps?",
"options": [
"From parents to children",
"From children to parents",
"Both ways",
"The developers decides"
],
"correctOption": 0,
"points": 10
},
{
"question": "How to pass data into a child component?",
"options": ["State", "Props", "PropTypes", "Parameters"],
"correctOption": 1,
"points": 10
},
{
"question": "When to use derived state?",
"options": [
"Whenever the state should not trigger a re-render",
"Whenever the state can be synchronized with an effect",
"Whenever the state should be accessible to all components",
"Whenever the state can be computed from another state variable"
],
"correctOption": 3,
"points": 30
},
{
"question": "What triggers a UI re-render in React?",
"options": [
"Running an effect",
"Passing props",
"Updating state",
"Adding event listeners to DOM elements"
],
"correctOption": 2,
"points": 20
},
{
"question": "When do we directly \"touch\" the DOM in React?",
"options": [
"When we need to listen to an event",
"When we need to change the UI",
"When we need to add styles",
"Almost never"
],
"correctOption": 3,
"points": 20
},
{
"question": "In what situation do we use a callback to update state?",
"options": [
"When updating the state will be slow",
"When the updated state is very data-intensive",
"When the state update should happen faster",
"When the new state depends on the previous state"
],
"correctOption": 3,
"points": 30
},
{
"question": "If we pass a function to useState, when will that function be called?",
"options": [
"On each re-render",
"Each time we update the state",
"Only on the initial render",
"The first time we update the state"
],
"correctOption": 2,
"points": 30
},
{
"question": "Which hook to use for an API request on the component's initial render?",
"options": ["useState", "useEffect", "useRef", "useReducer"],
"correctOption": 1,
"points": 10
},
{
"question": "Which variables should go into the useEffect dependency array?",
"options": [
"Usually none",
"All our state variables",
"All state and props referenced in the effect",
"All variables needed for clean up"
],
"correctOption": 2,
"points": 30
},
{
"question": "An effect will always run on the initial render.",
"options": [
"True",
"It depends on the dependency array",
"False",
"In depends on the code in the effect"
],
"correctOption": 0,
"points": 30
},
{
"question": "When will an effect run if it doesn't have a dependency array?",
"options": [
"Only when the component mounts",
"Only when the component unmounts",
"The first time the component re-renders",
"Each time the component is re-rendered"
],
"correctOption": 3,
"points": 20
}
]
}