🔥 There are 433 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.

You should be using JavaScript sets more often

Now in all browsers and Node - these 7 new set methods are key for when trying to compare two arrays or sets of data.

1.6K5514912
2.1K213411.3K112K

JavaScript roomba now sucks both ways

Figured out the motor controller Byte. First time I've had to write binary 1s and 0s in React.

1K3840273112K
1.5K62626
81935.2K

Controlling a roomba with JavaScript

Wrote the code to control it in the browser via Web Serial API, or on the server with serialport

1.5K8787288103K
37761149
36925
539533117K

This is a must have editor setting . Here is how I get those coloured indentation / bracket pairs in my editor.

1K762998488K
43121
1671590

I needed some data from social sites, but they don't provide an API

Here is how I scrape data from websites that don't provide an API by (ab)using the page rehydration object

64614
1.6K106171.9K89K

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

I keep importing the wrong thing in VS Code!

Pop an autoImportFileExcludePatterns in your settings file to exclude typescript types

Super helpful for Radix UI, Drizzle DB adapters, and node:test

34913
379613K
35821931219K
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

Use CSS Grid to stack items, and visibility: hidden to hide/show spinner.

This approach allows the largest item to size the button, and keeps the button text accessible

2.7K219532K175K
1.7K78
30723195