Jesse Wei
banner
mrjwei.bsky.social
Jesse Wei
@mrjwei.bsky.social
Product Designer & Software Engineer | Bridging creativity and technology to drive innovations.

My blog and works:
https://www.jessewei.net/
forwardRef is deprecated in #React 19. Now we can pass ref as a prop, alongside other props.

Check out this for more information↓
react.dev/blog/2024/12...
React v19 – React
The library for web and native user interfaces
react.dev
March 9, 2025 at 2:11 AM
A common feature in web development is closing a popup or menu when the user clicks outside of it.
But do you know how it’s actually implemented? More importantly, do you understand the key concepts behind it?
This tutorial breaks it all down↓

www.jessewei.net/writings/imp...
March 7, 2025 at 10:40 AM
#TailwindCSS doesn’t support a lighten() function, but here’s a workaround—you can adjust a color’s perceived lightness by setting its opacity, like this:

text-red-200/25.

This makes the text color 25% opaque, giving it a much lighter appearance than the original color.
March 1, 2025 at 12:15 PM
When working on a #Next.js project recently, I encountered this error: "params should be awaited before using its properties".
February 27, 2025 at 12:02 PM
When working with #TypeScript in #React, I defined a prop as an array that could contain strings and/or numbers:

prop: (string | number)[];
February 24, 2025 at 12:34 AM
Landed in #Brisbane and ready to start a new academic journey! I'm going do a master's in IT to further explore the intersection of #design and #technology.
February 21, 2025 at 10:08 PM
The #TestingLibrary offers various query methods like findBy~ and queryBy~, each with distinct behaviors depending on whether elements are found or not.

Here’s a quick reference table to compare their return values and error-throwing behaviors (image source: testing-library.com/docs/queries... ):
January 24, 2025 at 11:38 AM
📢 #Pandas Tip: When using .apply() on a grouped DataFrame, you may see DeprecationWarning: DataFrameGroupBy.apply operated on the grouping columns. What does it mean, and how to fix it?
January 15, 2025 at 1:42 AM
I didn't know #npm has this pkg command that is surprisingly handy in managing package.json via command line. It comes with get, set, delete and fix sub commands.

e.g: npm pkg set scripts.dev="node server"
January 13, 2025 at 1:14 AM
The #NextJS docs say:

“Server Components allow you to keep sensitive data and logic on the server, such as tokens and API keys, without the risk of exposing them to the client.”
January 12, 2025 at 1:42 AM
When working with #Pandas, you’ll likely encounter the SettingWithCopyWarning. You may have heard that chained assignment should be avoided—but do you know why?
January 5, 2025 at 1:08 PM
The format parameter in pd.to_datetime specifies the current format of the datetime data in your input—not the target (desired) format. This can be surprising at first! #Pandas #Insight
December 28, 2024 at 12:35 PM
It's #ChristmasEve in #Japan, so no work or studying tonight—just enjoying a traditional Japanese dinner with family!
December 24, 2024 at 12:38 PM
?? is called the nullish coalescing operator in #Javascript. It returns its right-hand side value only when its left-hand one is null or undefined; otherwise, returns its left-hand operand.
December 24, 2024 at 12:34 AM
According to #React docs, #propTypes were deprecated and type checks using it will be ignored. Also, support for #defaultProps is now only restricted to class components, in favour of default parameters (e.g. myComp({prop = 10}: TProps) {}).
December 23, 2024 at 6:05 AM
Reposted by Jesse Wei
variable names *are* code comments
December 22, 2024 at 8:22 PM
When working through Chapter 5: Image Classification of the #Fastai book, I initially struggled with this statement about probability and confidence:

Those numbers (0.99 and 0.999) are very close together—but in another sense, 0.999 is 10 times more confident than 0.99.
December 22, 2024 at 9:42 AM
A TL;DR comparison of #ReactElement, #ReactNode, & #JSX.Element:

1. ReactElement: an object representing a UI element with these properties:

type: specifies the element type (div, p, span, etc.)
props: the element's attributes and children
key: helps identify an element in an array
December 18, 2024 at 9:13 AM
The time-tracking apps I’ve used didn’t meet my needs, so I decided to build one myself. I’m documenting the process and progress on my blog:
www.jessewei.net/series/perfm...
Perfmate: A Time-tracking App Every Freelancer Needs (Part 1)
An app that tracks and visualizes your work hours and earnings on a daily and monthly basis.
www.jessewei.net
December 16, 2024 at 1:18 PM
Approximating the area of a circle using triangles had always been my go-to approach—until I came across this amazing #Calculus introduction. It uses concentric circle slices instead, a method I’d never considered before. Mind blown! #3Blue1Brown
www.3blue1brown.com/lessons/esse...
3Blue1Brown - The Essence of Calculus
An overview of what calculus is all about, with an emphasis on making it seem like something students could discover for themselves. The central example is that of rediscovering the formula for a cir...
www.3blue1brown.com
December 13, 2024 at 12:31 PM
When working through the #Fastai book, I was puzzled about why we update parameters using: \params.data -= lr * \params.grad.data instead of something simpler like: \params.data -= 0.001.
December 13, 2024 at 12:07 PM
Didn’t get what the backward method does in #PyTorch at first, but a #ComputationGraph made it click! Suddenly feel all the #Calculus I’ve been learning found its purpose.
December 11, 2024 at 12:09 PM
One application of this approach: bsky.app/profile/mrjw...
is a function in an app I'm building.
This approach offers a few benefits, one of which is synced time zone. When working with `getFullYear()`, `getMonth()`, etc. a gotcha is mismatched time zone. The time zone used depends on the machine where the methods are called and users have no way to configure it.
December 9, 2024 at 1:15 PM
Started the #Fastai DL course and built my first image recognizer model. It was fun to test it in a simple web app. Super excited to dive deeper!
December 8, 2024 at 2:14 AM
#ParameterizedTests are super handy and flexible. ❌Instead of doing:
December 7, 2024 at 12:20 AM