@tomk
Portfolio
July 2026
Game developer turned web dev. Loves WebGL and creative coding.
3
Questions
2
Answers
1
Gold Badges
2
Silver Badges
2
Bronze Badges
I want to automatically run tests and type-checking before each deployment to Vercel. Currently I just push to main and Vercel deploys automatically, but sometimes broken code gets deployed.
My stack: Next.js 14, TypeScript, Vitest for tests. How do I set up GitHub Actions to block the deployment if tests fail?
Tom Kowalski
asked 1 months ago1
Answers18
Upvotes3100
ViewsMy component keeps re-rendering infinitely. Here's a simplified version:
function MyComponent({ onUpdate }) {
const [data, setData] = useState(null);
useEffect(() => {
fetchSomething().then(setData);
onUpdate(data);
}, [onUpdate, data]);
}
I think the issue is with onUpdate but I'm not sure. What are the rules for the dependency array?
Tom Kowalski
asked 2 months ago2
Answers88
Upvotes7800
ViewsI'm starting a new project and I'm torn between the App Router and the legacy Pages Router in Next.js 14.
My requirements:
Which router would you recommend and why? Are there known gotchas I should be aware of?
Tom Kowalski
asked 3 months ago3
Answers35
Upvotes8911
Views1