Skip to content

Commit 62fd4d6

Browse files
corrected props function code
1 parent a9c3481 commit 62fd4d6

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Debugging-Profiling/Debugging-and-Profiling-ultimate-guide.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,13 @@ Every React Native UI update happens on this thread. Therefore, if you’re mani
287287

288288
This thread’s primary role is to **_keep the interface smooth and responsive_**. An example is animating a member using the Animated API.
289289

290-
Animated.timing(this.state.fadeAnim, {
291-
// this executes on the UI thread
292-
toValue: 1,
293-
duration: 2000,
294-
}).start();
290+
```javascript
291+
Animated.timing(this.state.fadeAnim, {
292+
// this executes on the UI thread
293+
toValue: 1,
294+
duration: 2000,
295+
}).start();
296+
```
295297

296298
In the above code snippet, **`Animated.timing`** updates the component’s opacity over two seconds. This animation occurs on the Main Thread to ensure smooth UI updates.
297299

0 commit comments

Comments
 (0)