Forwarded from Programming Quiz Channel
What does the strict equality operator === check that == does not?
Anonymous Quiz
12%
Variable names
73%
Type in addition to value
8%
Memory address
8%
Nothing, they're identical
❤3🔥1
📌 React Isn't the Problem
A React app doesn't become slow overnight. It becomes slow when unnecessary render accumulates overtime.
Most developers reach for
The better question is:
Why did this component render in the first place?
Open React DevTools and enable Highlight updates. Click around your app.
If your navigation bar flashes every time you type into a search box, you've already found a performance issue.
A React app doesn't become slow overnight. It becomes slow when unnecessary render accumulates overtime.
A render is React running a component again to determine what should appear on the screen.
Most developers reach for
useMemo, useCallback, or another optimization as soon as performance drops. That's often treating the symptom.The better question is:
Why did this component render in the first place?
Open React DevTools and enable Highlight updates. Click around your app.
If your navigation bar flashes every time you type into a search box, you've already found a performance issue.
❤4
Your useEffect Might be Doing Too Much
Examples: Fetching data, Subscribing to events, Updating the document title.
The problem starts when developers use it for normal calculations.
Example:
This creates unnecessary work.
The effect adds another state update, another render, and another thing to debug.
A useful question:
If not, it probably doesn't belong inside
An effect is code that runs after React updates the screen, usually for interacting with things outside React.
Examples: Fetching data, Subscribing to events, Updating the document title.
The problem starts when developers use it for normal calculations.
Example:
useEffect(() => {
setTotal(price * quantity)
}, [price, quantity])This creates unnecessary work.
total can already be calculated during rendering.The effect adds another state update, another render, and another thing to debug.
A useful question:
Does this code synchronize with something outside React?
If not, it probably doesn't belong inside
useEffect.❤2
Forwarded from Free Programming Books
You Dont Know JS Yet Async and Performance.pdf
11.2 MB
📘 You Don't Know JS Yet: Async & Performance
✍️ Author: Kyle Simpson
🗓 Year: 2015
📄 Pages: 296
🧠 No matter how much experience you have with JavaScript, odds are you don't fully understand the language. As part of the "You Don't Know JS" series, this concise yet in-depth guide focuses on new asynchronous features and performance techniques - including Promises, generators, and Web Workers - that let you create sophisticated single-page web applications and escape callback hell in the process.
#JavaScript
✍️ Author: Kyle Simpson
🗓 Year: 2015
📄 Pages: 296
🧠 No matter how much experience you have with JavaScript, odds are you don't fully understand the language. As part of the "You Don't Know JS" series, this concise yet in-depth guide focuses on new asynchronous features and performance techniques - including Promises, generators, and Web Workers - that let you create sophisticated single-page web applications and escape callback hell in the process.
#JavaScript
❤2🔥1
React Context
(How to stop your React components from rendering unnecessarily)
(How to stop your React components from rendering unnecessarily)
❤3
Git Rebase Explained
A rebase takes your commits and moves them on top of another branch, creating a cleaner history.
Imagine:
After rebasing:
Your feature looks like it was created from the latest version of main.
Teams use it:
- To maintain cleaner commit history.
- For easier code reviews.
- Fewer unnecessary merge commits.
📌 The rule: Rebase your local work. You have to be careful rebasing commits that other people already use.
A rebase takes your commits and moves them on top of another branch, creating a cleaner history.
Imagine:
main:
A---B---C
feature:
D---E
After rebasing:
main:
A---B---C---D---E
Your feature looks like it was created from the latest version of main.
Teams use it:
- To maintain cleaner commit history.
- For easier code reviews.
- Fewer unnecessary merge commits.
📌 The rule: Rebase your local work. You have to be careful rebasing commits that other people already use.
👍2❤1
🔥 7 Free AI Tools for Developers You Should Try
If you're learning to code or building projects, these AI tools can save you hours every week 👨💻⚡️
1. Cursor 💻
• AI-powered code editor
• Write, debug and understand code faster
2. GitHub Copilot 🤖
• AI coding assistant
• Get code suggestions directly in your editor
3. Replit 🚀
• Code and build projects in your browser
• AI assistance + instant deployment
4. v0 🎨
• Generate UI from text prompts
• Great for quickly creating web interfaces
5. Bolt.new ⚡️
• Build full-stack applications using prompts
• Useful for quickly prototyping ideas
6. Lovable 🛠
• Create web apps using natural language
• Great for turning ideas into working prototypes
7. Phind 🔎
• AI search built for developers
• Useful for technical questions and debugging
💾 Save this list for your next project.
If you're learning to code or building projects, these AI tools can save you hours every week 👨💻⚡️
1. Cursor 💻
• AI-powered code editor
• Write, debug and understand code faster
2. GitHub Copilot 🤖
• AI coding assistant
• Get code suggestions directly in your editor
3. Replit 🚀
• Code and build projects in your browser
• AI assistance + instant deployment
4. v0 🎨
• Generate UI from text prompts
• Great for quickly creating web interfaces
5. Bolt.new ⚡️
• Build full-stack applications using prompts
• Useful for quickly prototyping ideas
6. Lovable 🛠
• Create web apps using natural language
• Great for turning ideas into working prototypes
7. Phind 🔎
• AI search built for developers
• Useful for technical questions and debugging
💾 Save this list for your next project.
❤3
CSS Text Effects
This is a library of 90 animated text effects built with pure CSS; aurora gradients, glitches, split-flap boards, liquid fills and other lesser-seen tricks.
No JavaScript, no dependencies. Copy the self-contained
Try it at: https://text-effects.colorion.co/
Follow our page for more.
This is a library of 90 animated text effects built with pure CSS; aurora gradients, glitches, split-flap boards, liquid fills and other lesser-seen tricks.
No JavaScript, no dependencies. Copy the self-contained
CSS for any effect, or grab a ready-made Prompt to have your coding agent recreate it. Try it at: https://text-effects.colorion.co/
Follow our page for more.
❤1
Forwarded from Programming Quiz Channel
What is a key difference between arrow functions and regular functions regarding 'this'?
Anonymous Quiz
22%
Arrow functions get their own 'this' bound at call time, just like regular functions
69%
Arrow functions don't have their own 'this'; they inherit it lexically from the surrounding scope
3%
Regular functions never have access to 'this'
6%
There is no meaningful difference
❤2