Welcome to Code with Adiii, your ultimate destination for all things coding! 🚀
On this channel, we dive deep into the world of programming, offering tutorials, tips, and insights to help you become a better developer. Whether you're a beginner taking your first steps in coding or an experienced programmer looking to enhance your skills, there's something here for everyone.
We cover a wide range of topics, including web development, mobile app development, desktop applications, and more. Each video is crafted to provide clear, concise, and practical guidance to help you on your coding journey.
Subscribe and join our community of passionate coders. Don't forget to hit the notification bell so you never miss an update. Let's learn, code, and grow together!
Happy coding! 💻✨
Code with Adiii
💡 React useState – Explained Simply
Many beginners think React is confusing because the UI updates “automatically.”
But once you understand useState, everything starts to make sense.
In React, you don’t update the UI directly.
You update the state, and React takes care of the UI for you.
Example:
const [count, setCount] = useState(0);
👉 count stores the current value
👉 setCount updates the value
When you click a button and call setCount(count + 1), React:
1️⃣ Updates the state
2️⃣ Re-renders the component
3️⃣ Updates only the changed part of the UI
That’s why there is no page refresh.
❌ Common mistake beginners make:
count = count + 1;
This changes the variable but React won’t re-render.
✅ Correct way:
setCount(count + 1);
Once you understand this flow:
State change ➝ Re-render ➝ UI update
React becomes much easier.
📌 Tip for beginners:
Master useState and props before jumping into advanced hooks.
2 weeks ago | [YT] | 0
View 0 replies
Code with Adiii
Which HTML tag is used to display JavaScript output in React JSX?
2 weeks ago | [YT] | 0
View 0 replies
Code with Adiii
What will this Javascript code output?
console.log(typeof null);
2 weeks ago | [YT] | 0
View 0 replies
Code with Adiii
Top 5 Mistakes Beginners Make in React
-> Using too many states instead of a single structured state.
-> Forgetting to add a key in lists (map).
-> Not cleaning up side effects in useEffect.
-> Mixing UI logic with business logic in the same file.
-> Not learning basic JavaScript before jumping to React.
💡 Fix these early → You’ll become a pro faster!
3 months ago | [YT] | 2
View 0 replies
Code with Adiii
What is the output?
console.log(typeof NaN);
5 months ago | [YT] | 2
View 0 replies
Code with Adiii
In Python, what is the output?
x = [1, 2, 3]
print(x * 2)
5 months ago | [YT] | 1
View 0 replies
Code with Adiii
Which data structure uses FIFO (First In, First Out)?
5 months ago | [YT] | 1
View 0 replies
Code with Adiii
What is the time complexity of binary search in a sorted array?
5 months ago | [YT] | 2
View 0 replies
Code with Adiii
Which of these is not a JavaScript framework?
5 months ago | [YT] | 1
View 0 replies
Code with Adiii
print(0.1 + 0.2 == 0.3)
#python
5 months ago | [YT] | 1
View 0 replies
Load more