You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[**freeCodeCamp Article** - This is why we need to bind event handlers in Class Components in React](https://www.freecodecamp.org/news/this-is-why-we-need-to-bind-event-handlers-in-class-components-in-react-f7ea1a6f93eb/) - [30 minutes]
**I want** the application to handle errors gracefully
165
+
**As a** user
166
+
**I want** the application to handle errors gracefully
116
167
**So that** I can still use the app even if parts of it fail
117
168
118
169
**Scenario:** Error Boundary Implementation
@@ -122,10 +173,15 @@
122
173
-**And** a fallback UI should be displayed
123
174
-**And** there should be a test button to simulate errors
124
175
125
-
## Template
176
+
**Acceptance Criteria:**
126
177
127
-
This template represents the possible layout for your app, but you can create your app based on your own preferences.
178
+
- A **test button** is available to simulate an application error.
179
+
- Clicking the test button **triggers an error** that is **logged in the console**.
180
+
- A **fallback UI** is displayed when an error occurs.
128
181
182
+
## Template
183
+
184
+
This template represents the **possible layout** for your app, but you can create your app based on your own preferences. Feel free to customize it — your creativity is not limited, and **you can design the UI** your users truly deserve.
129
185
Successful response.
130
186
131
187
```text
@@ -183,6 +239,34 @@ Non-successful response.
183
239
184
240
6. You can use CSS frameworks (e.g. Tailwind CSS).
185
241
242
+
### Penalties
243
+
244
+
-**1. Project setup**
245
+
- Project has been set up without using [Vite](https://vitejs.dev/guide/) with the [_react-ts_ template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts): **-95 points**
246
+
247
+
-**2. TypeScript & Code Quality**
248
+
- TypeScript isn't used: **-95 points**
249
+
- Usage of _any_: **-20 points per each**
250
+
- Usage of _ts-ignore_: **-20 points per each**
251
+
- Presence of _code-smells_ (God-object, chunks of duplicate code), commented code sections: **-10 points per each**
252
+
253
+
-**3. React Best Practices**
254
+
- Direct DOM manipulations inside the React components: **-50 points per each**
255
+
- React hooks are used to get access to either state, or to the component lifecycle: **-70 points**
256
+
257
+
-**4. External Dependencies**
258
+
- Usage of Redux or other state management libraries: **-100 points**
259
+
- Usage of component libraries, e.g. Material UI, Ant Design: **-100 points**
- React setup files are located in the `main` branch: **-100 points**
266
+
- Missing dedicated branch named `class-components`: **-100 points**
267
+
- Usage of React hooks: **-100 points**
268
+
- Lack of component decomposition (everything in one file or poorly structured): **-50 points**
269
+
186
270
## FAQ (Frequently Asked Questions)
187
271
188
272
### ❓ Does the search input require an exact name match?
@@ -195,7 +279,11 @@ Fetch the full list (or first page) of items from the API.
195
279
196
280
### ❓ How to simulate a failed request?
197
281
198
-
Use ModResponse or set an invalid endpoint to trigger a 4xx/5xx response.
282
+
Use [ModResponse](https://chromewebstore.google.com/detail/modresponse-mock-and-repl/bbjcdpjihbfmkgikdkplcalfebgcjjpm?pli=1) or set an invalid endpoint to trigger a 4xx/5xx response.
283
+
284
+
### ❓ How to see the loader during a request?
285
+
286
+
In your browser’s **Developer Tools → Network** tab, you can **throttle the network speed** to observe the loading indicator.
199
287
200
288
### ❓ My loader is not visible — API is too fast. What to do?
201
289
@@ -214,29 +302,3 @@ No. The PR will update automatically as long as it's not merged.
214
302
215
303
Function components are allowed, but **state and lifecycle functionality must be implemented using class components**.
216
304
Hooks are not permitted in this task.
217
-
218
-
### Penalties
219
-
220
-
-**1. Project setup**
221
-
222
-
- Project has been set up without using [Vite](https://vitejs.dev/guide/) with the [_react-ts_ template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts): **-95 points**
223
-
224
-
-**2. TypeScript & Code Quality**
225
-
226
-
- TypeScript isn't used: **-95 points**
227
-
- Usage of _any_: **-20 points per each**
228
-
- Usage of _ts-ignore_: **-20 points per each**
229
-
- Presence of _code-smells_ (God-object, chunks of duplicate code), commented code sections: **-10 points per each**
230
-
231
-
-**3. React Best Practices**
232
-
233
-
- Direct DOM manipulations inside the React components: **-50 points per each**
234
-
- React hooks are used to get access to either state, or to the component lifecycle: **-70 points**
235
-
236
-
-**4. External Dependencies**
237
-
238
-
- Usage of Redux or other state management libraries: **-100 points**
239
-
- Usage of component libraries, e.g. Material UI, Ant Design: **-100 points**
0 commit comments