🔥 There are 260 Hot Tips!!

Hot tips are spicy lil' nuggets related to web development and tooling that I share on my twitter account. I've logged them here to make them easier to find.

Tanstack Start doing doing server calls a bit different than React Server Components.

You can write the client and server logic in the same file and it replaces it with fetch calls when run on the client.

No "use client", no errors around using client APIs in server components

717372434368K
44518
4391212K
2548127.5K

I keep importing the wrong thing in VS Code! Pop an autoImportFileExcludePatterns in your settings file Super helpful for Radix UI, Drizzle DB adapters, and node:test

35821931219K
34634209.8K
34913
28613220

Are you using position: absolute; to overlap elements?

It's almost always better to Use CSS Grid instead!

3.9K366773.2K293K
2.5K3064K
1.8K1165829K
1.1K43

One of the biggest problems with UI development is about to be solved!

Customizable <select> brings allows us to create totally custom dropdowns with HTML and CSS.

Accessible, gracefully degrades and requires no JS!

712671034053K
1.4K59
632753510K
591308425

Did you know you can use Promise.allSettled() for async error handling with a single promise?

Collect errors and returned data at the same level!

9978118666103K
42516811K
58415
431710K
136551

Can we please stop with the scroll-jacking carousels on websites?

CSS Scroll Snap is a much better solution!

Re-built the Uniqlo home page with 6 lines of CSS and 4 lines of JS

6K449555.5K291K
1K632619K
1K2518K
2.5K64
16712102

🔥 Here is a neat one! Since arrays are objects, we can destructure their indexes to easily grab the first and last items.

3.5K94066345

🔥 Use Intl.Collator() to easily sort or group strings regardless of their case or accent

503117640

🔥 New in ES2019, we have a .flat() method to flatten these types of chunked arrays.

20142711

🔥 When working with an API, I often need to chunk up a list of users and send them in batches.

Array.from() is a great way to chunk up arrays because of the secondary argument being a map function.

1.1K18619152