Blue Desk

Rodrigo’s blog.

Monday, June 26, 2023

A generic hook for useState and Immer

›
While prospecting the use of useState with the great Immer , I ended up finding the small use-immer package, which unifies both things. Ho...
Thursday, June 22, 2023

Java Either class

›
Today, at work, I had the dire need of discriminated unions in Java, which of course doesn’t support it. Then I found the idea of the Eithe...
Thursday, June 8, 2023

Using Zustand, TypeScript and Immer together

›
In React land, Redux nightmare finally came to an end with the inception of Zustand , which throws away all the chores we had to previousl...
2 comments:
Saturday, June 3, 2023

TypeScript map for objects

›
In another round of React experiments, after another Vue frustration with Volar not typing event arguments, I was again into the state norm...
Saturday, April 15, 2023

Testing GitHub pull requests before merging

›
My personal projects on GitHub receive contributions oftentimes. It’s very flattering when other people get interested in your personal wor...
Thursday, February 9, 2023

Fetch calls with global Jotai object

›
Zustand is a great React state management library, but it has the drawback of not having a standard way to define getters, which must be de...
Tuesday, December 6, 2022

The three rules of lifetime elision in Rust

›
While reviewing some Rust fundamentals, I stumbled across this excellent video about lifetimes. What caught my attention the most was the “...
Wednesday, October 5, 2022

Zustand computed values

›
This week I’ve faced some situations with Vue’s reactive that alarmed me. I’m finding the hard way what I’ve read a couple times: reactive ...
Wednesday, September 28, 2022

Multiple className values in React

›
React offers basically zero support for CSS. Personally I’m fond of CSS Modules along with SCSS instead of the slow CSS-in-JS solutions ou...
Thursday, July 21, 2022

Sizes of Windows integral types

›
While developing WinSafe , it’s very common to convert the Windows integral data types to their Rust equivalent. Care must be taken, howeve...
1 comment:
Tuesday, July 19, 2022

Default props in React function components

›
Having default props in a React component is a rather common situation. The most popular way to accomplish this is to pass the default value...
Thursday, July 7, 2022

Extending built-in TypeScript objects in Vite

›
Checking whether an array is empty is a rather common operation. The usual way to do this in TypeScript is by checking the length property,...
‹
›
Home
View web version
Powered by Blogger.