Divya Verma

65 posts

Divya Verma banner
Divya Verma

Divya Verma

@divyaver1967

software developer who loves to create and solve problems. When I’m not coding, you’ll find me sketching, playing music, or getting lost in books.

Katılım Aralık 2024
48 Takip Edilen5 Takipçiler
le.hl
le.hl@0xleegenz·
"One day you will unknowingly pose for the picture that will be used for your funeral"
English
41
606
10.7K
186.9K
Divya Verma
Divya Verma@divyaver1967·
✅ Use navigate when: ✔️ You want to return to a previous screen without creating duplicates. ✔️ Avoiding stack clutter by keeping only one instance of a screen. ✔️ The screen can be accessed from multiple places, and you don’t want multiple copies of it.
English
0
0
2
49
Divya Verma
Divya Verma@divyaver1967·
✅ Use push when: ✔️ You need multiple instances of a screen (e.g., multiple open chats). ✔️ You want to preserve navigation history and allow users to go back step by step. ✔️ Navigating deep into content that needs its own screen (e.g., different product detail pages).
English
1
0
2
63
Divya Verma
Divya Verma@divyaver1967·
📌 What happens under the hood? ->push creates a new instance of the screen every time it is called. ->navigate searches for the screen in the stack. If found, it brings it to the top and removes any screens above it. If not found, it behaves like push.
English
0
0
2
32
Divya Verma
Divya Verma@divyaver1967·
🔹 push('ScreenName') → Always adds a new screen to the stack 🔹 navigate('ScreenName') → Finds an existing screen and moves it to the top
English
1
0
2
32
Divya Verma
Divya Verma@divyaver1967·
🚀 Mastering React Navigation: push vs navigate: In React Navigation, push and navigate handle screen transitions, but they work differently. Understanding their nuances can help you build a smoother app experience. #javascript #reactnative #InterviewPreparation #Coding
English
1
0
2
52
Divya Verma
Divya Verma@divyaver1967·
Another day of winter! 🫥
English
0
0
2
39
Divya Verma
Divya Verma@divyaver1967·
function Person(name) { this.name = name; } const yomesh = new Person("Yomesh"); console.log(yomesh); // Output: Person { name: 'Yomesh' } Understanding constructor behavior helps avoid tricky bugs! 🚀
English
0
0
2
40
Divya Verma
Divya Verma@divyaver1967·
No Explicit Return in Constructor ✅ : If a constructor does not explicitly return, new automatically returns the created instance (this).
English
1
0
2
41
Divya Verma
Divya Verma@divyaver1967·
Use bind for creating reusable functions, and call/apply for one-time method borrowing. Master these, and this will be your superpower! 💡
English
0
0
2
40
Divya Verma
Divya Verma@divyaver1967·
While bind returns a new function, call and apply immediately execute the function with a custom this. 1. dog.bark.call(cat); // Whiskers says Woof! 2. dog.bark.apply(hamster); // Speedy says Woof!
English
1
0
2
42