💥 Tailwind CSS is ruining web development.
I said it.
You build faster, but you stop thinking in CSS.
Agree or disagree?
👉 Drop your opinion below.
I said it.
You build faster, but you stop thinking in CSS.
Agree or disagree?
👉 Drop your opinion below.
❤8👍4
🎯 Here’s how to center anything in CSS — even your soul:
🔥 Bookmark this. Or tattoo it on your arm.
🔁 Share it with a junior dev.
.parent {
display: flex;
justify-content: center;
align-items: center;
}🔥 Bookmark this. Or tattoo it on your arm.
🔁 Share it with a junior dev.
👍7❤5🤩5
😱 WTF
Ever seen this JS behavior?
WTF is going on here?
Can you explain the 3rd one?
Ever seen this JS behavior?
console.log([] + []); // ''
console.log([] + {}); // '[object Object]'
console.log({} + []); // 0
WTF is going on here?
Can you explain the 3rd one?
👍9
⚡️ React trick: use useEffect in React like a pro
✅ Clean up side effects.
💬 Have you ever forgotten the return part?
useEffect(() => {
const handler = () => console.log('resize');
window.addEventListener('resize', handler);
return () => window.removeEventListener('resize', handler);
}, []);✅ Clean up side effects.
💬 Have you ever forgotten the return part?
❤11👍3
🤖 Will AI take your frontend dev job in 5 years?
Be honest.
Be honest.
Anonymous Poll
34%
😨 Yes, 100%
28%
🤷♂️ Maybe, but not all jobs
19%
😎 No, creative devs will thrive
19%
🧠 I’m already using AI to code faster
❤1
🤖 Which AI tools are part of your dev workflow?
💬 What’s your killer combo? Personally, I use ChatGPT for planning + Cursor for coding. 📤 Share with your team to compare stacks.
💬 What’s your killer combo? Personally, I use ChatGPT for planning + Cursor for coding. 📤 Share with your team to compare stacks.
Anonymous Poll
58%
🧠 ChatGPT / GPT-4
27%
🧑💻 Cursor (AI coding IDE)
16%
✍️ Claude (for docs & code reviews)
20%
📷 GitHub Copilot
13%
🛑 I don’t trust AI yet
👍7👌2
🪝 Smooth Anchor Scroll in React
Aloha, frontend comrades! 🌴
Recently I had to solve a classic UX problem: when a user closes one tab or section, they should be automatically scrolled to another part of the page.
Sounds simple enough, right? Here’s how you can implement anchor-like behavior in React using ref and scrollIntoView().
⸻
🔧 The gist:
1. Create a ref for the target element
2. Trigger ref.current.scrollIntoView() when needed
⸻
🧪 Example Code:
✨ Bonus tip: You can add behavior: "smooth" for smooth scrolling like this:
Happy experimenting!
💬 Have you ever needed anchors in a React app?
📤 Share this post with a dev who loves clean UX.
Aloha, frontend comrades! 🌴
Recently I had to solve a classic UX problem: when a user closes one tab or section, they should be automatically scrolled to another part of the page.
Sounds simple enough, right? Here’s how you can implement anchor-like behavior in React using ref and scrollIntoView().
⸻
🔧 The gist:
1. Create a ref for the target element
2. Trigger ref.current.scrollIntoView() when needed
⸻
🧪 Example Code:
import React, { useRef } from 'react';
const ScrollDemo = () => {
const myRef = useRef(null);
const executeScroll = () => myRef.current.scrollIntoView();
return (
<>
<div style={{ height: 600 }} />
<div ref={myRef}>This is the element we’ll scroll to</div>
<div style={{ height: 1500 }} />
<button onClick={executeScroll}>Scroll to element</button>
</>
);
};
✨ Bonus tip: You can add behavior: "smooth" for smooth scrolling like this:
myRef.current.scrollIntoView({ behavior: "smooth" });
Happy experimenting!
💬 Have you ever needed anchors in a React app?
📤 Share this post with a dev who loves clean UX.
👍13🔥1
👨🍼 Junior Tip
🧠 If you’re a junior dev, here’s ONE mindset shift to level up:
💬 Stop writing code to “make it work.”
Start writing code you can defend in a code review.
📤 Forward to a dev starting their first job.
🧠 If you’re a junior dev, here’s ONE mindset shift to level up:
💬 Stop writing code to “make it work.”
Start writing code you can defend in a code review.
📤 Forward to a dev starting their first job.
❤10👍10
🥋 IYKYK
🧪 Only real devs know what this means:
😵💫 Drop the one that haunted you most.
👀 Forward to a dev friend to test their sanity.
🧪 Only real devs know what this means:
== vs ===
null vs undefined
0.1 + 0.2 !== 0.3
NaN !== NaN
😵💫 Drop the one that haunted you most.
👀 Forward to a dev friend to test their sanity.
👍7🔥1
UX Red Flag Sunday ✅
🚩 UX red flags that scream “junior coded this”:
• <div>s with onClick instead of <button>
• Scroll jank
• Input with no label
• Spinner. Forever. No feedback.
❗ Seen worse? Drop it below.
🧠 Save this for your code review checklist.
🚩 UX red flags that scream “junior coded this”:
• <div>s with onClick instead of <button>
• Scroll jank
• Input with no label
• Spinner. Forever. No feedback.
❗ Seen worse? Drop it below.
🧠 Save this for your code review checklist.
❤6👍1
🙏 Dev Confession Monday
Forgive me, dev Gods, for I have sinned:
• Wrote CSS in JS… and enjoyed it
• Pushed to main on Friday
• Used !important 12 times
• Ignored eslint warnings
🧼 Cleanse yourself in the comments.
📨 Confess anonymously: tag a fellow sinner.
Forgive me, dev Gods, for I have sinned:
• Wrote CSS in JS… and enjoyed it
• Pushed to main on Friday
• Used !important 12 times
• Ignored eslint warnings
🧼 Cleanse yourself in the comments.
📨 Confess anonymously: tag a fellow sinner.
👍9👏3❤1
🎆 Relatively New Things You Should Know about HTML Heading Into 2025
Not all of this is like absolutely brand spanking new just-dropped-in-2024 stuff. Some of it is, but generally it’s relatively new stuff that’s all pretty great. I’m pointing things out that I think are really worth knowing about. It’s possible you haven’t kept up too much with HTML developments as it tends to, rightfully, move a lot slower than CSS or JavaScript.
Not all of this is like absolutely brand spanking new just-dropped-in-2024 stuff. Some of it is, but generally it’s relatively new stuff that’s all pretty great. I’m pointing things out that I think are really worth knowing about. It’s possible you haven’t kept up too much with HTML developments as it tends to, rightfully, move a lot slower than CSS or JavaScript.
❤7
Recently, CSS has supported "logical" direction based properties for margin, padding, border, etc!
Previous to this, we were able to define properties based on physical directions like left, right, etc. This was a problem when different writing modes come into play, such as Arabic which is written from right to left, or traditional Chinese, Japanese, which are written from top to bottom.
👉 These new properties automatically adjust to the writing mode without the need for media queries.
"block" indicates main axis of writing mode (top to bottom for English)
"inline" indicates the cross axis of the writing mode (left to right for English)
You can combine this to create different properties for margin, padding, border, size and inset
👉 margin-block-end
👉 padding-inline
👉 border-inline-start
👉 inline-size
👉 block-size
✨ This also has the benefit that it provides shorthands like margin-inline which sets both left and right margin
Previous to this, we were able to define properties based on physical directions like left, right, etc. This was a problem when different writing modes come into play, such as Arabic which is written from right to left, or traditional Chinese, Japanese, which are written from top to bottom.
👉 These new properties automatically adjust to the writing mode without the need for media queries.
"block" indicates main axis of writing mode (top to bottom for English)
"inline" indicates the cross axis of the writing mode (left to right for English)
You can combine this to create different properties for margin, padding, border, size and inset
👉 margin-block-end
👉 padding-inline
👉 border-inline-start
👉 inline-size
👉 block-size
✨ This also has the benefit that it provides shorthands like margin-inline which sets both left and right margin
🔥7❤6👍2