Add braces to an arrow function and it can quietly return undefined 馃か
(n) => n * 2 hands back the value. (n) => { n * 2 } is a block, and a block gives nothing back unless you write return.
The same rule explains a lot of JavaScript syntax 馃憞
With Prisma course being live, Start.dev now covers each layer of a AI product development with TypeScript track -
- The database: courses on SQL and Prisma
- The language: Typescript course
- The server: Building APIs and routes with Node course
- The interface: Build beautiful UI components with React course
- The code that lasts: Course on Design Principles of Software
- AI features: Adding AI features to your full stack app using Vercel AI SDK
Learn Prisma is live on Start.dev 馃帀
Work with a real PostgreSQL database from TypeScript using Prisma 8. You'll write typed queries and relations, use transactions, and run migrations that change a table without losing data.
Taught by @traversymedia . Course link below 馃憞
Learn Prisma is live on Start.dev 馃帀
Work with a real PostgreSQL database from TypeScript using Prisma 8. You'll write typed queries and relations, use transactions, and run migrations that change a table without losing data.
Taught by @traversymedia . Course link below 馃憞
Every element on a page is a box with four layers 馃摝
- Content, then padding, then the border, then margin.
- Padding is inside the border, margin is outside it.
- The background fills content and padding, never the margin.
Diagrams, box-sizing and the gotchas 馃憞
const { name } = user
You've seen it in every React file. It just pulls name out of user into its own variable 鉁傦笍
Curly braces grab by name, square brackets grab by position. Defaults and renames 馃憞
GROUP BY in one picture 馃搳
Many rows in, one row per group out. Then COUNT and SUM tell you something about each group.
Five orders become three customers. Learn it with a real database 馃憞
Answer: it logs "0102030" 馃З
The scores are strings. total starts as 0, then 0 + "10" turns into "010", and every pass after that sticks another string on the end.
Turn each one into a number first and you get 60. Fix in the reply 馃憞
Find the bug 馃憖
You'd expect 60. What does this log, and why?
Answer on Saturday. Drop your guess in the replies.
3/ Components run on the server by default, so you can fetch right inside them.
Make it async, await the data and render it. No useEffect, no loading juggling for the first render.
1/ A page is just a file.
Make app/page.tsx, export a component, and that's your home page at /. No router config.
One API that creates, reads, updates and deletes data, split into routers and saved to a JSON file so it keeps the data after a restart.
A POST route that checks what it's sent. Pydantic validates the request body, and you send a status code that matches what happened.















