Blue Desk

Rodrigo’s blog.

Saturday, August 19, 2023

Calling write-only atoms in Jotai

›
Every atom in Jotai , when called through its useAtom primitive, returns a tuple of value + setter, just like React’s own useState . In a J...
Saturday, July 29, 2023

Delegating Display/Debug trait implementations

›
Suppose you want implement Display and Debug traits for your struct, but the output is the same. Instead of copy & paste the implement...
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...
1 comment:
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 oftentimes. It’s very flattering when other people get interested in your personal work, and actively use it...
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...
‹
›
Home
View web version
Powered by Blogger.