ReactJS, “key” is the key to solve this unable to update issue
In the project I am working on, there is a poorly finished Address control from a library maintained by another team. The control manages its own address sta...
In the project I am working on, there is a poorly finished Address control from a library maintained by another team. The control manages its own address sta...
ReactJS is one of the most popular frontend libraries, but everything has its downside. In this post, I’d like to share some reasons why people might thumb-d...
```typescript type User = { name: string age?: number active?: boolean }
Simplifying Feature Management with Balanced SOLID Principles
```typescript function foo({ handler }: { handler: () => void }) { handler() return { bar() { return ‘the string bar’ }, } }
Almost all SaaS systems need to implement Feature Flags and Settings(or Configurations) somehow. When people talk about them, they can be mixed together. The...
```typescript type ComponentProps = React.HTMLProps
Git is easy to start with and hard to master. Over the years I have collected a short list of habits that keep a repository clean, keep the history readable,...
When working for a company or a serious side hustle, probably this should be done via a third party library like https://www.npmjs.com/package/nanoid. Howeve...
Javascript is weird when compared to other popular programming languages. If you search it on the Internet, there’re a lot of articles talking about the weir...
I am not sure how many ways exactly to use a Map in Typescript. Just to list three here I believe are most commonly seen.
If to pass a variable which is a function, and also the type of that function need to be a generic one, it’s useful to define a generic function type when us...
CSS justify-* align-* basically includes: justify-content, justify-item, justify-self, align-content, align-item and alignt-self
e.target.value could look familiar by almost all experienced web developers. That’s commonly seen in the input text box event handler in reactjs code, .e.g o...
Github actions looks cool. I can’t wait for using it even if it’s still in ‘beta’ at the moment.
Millions tutorials online of CSS flexbox is about one pattern: parent dispay: flex; + one level children. However, in practice, flexbox is used in nested pat...
Generate an array
Jest mock module feature can be used for mocking whole or part of packages in your project. Check out: https://jestjs.io/docs/manual-mocks
After upgrading MacOS to Catalina, everytime opening a terminal, there would be a prompt saying:
This article is just a trouble-shooting blog. It’s rarely happen. After you even did a force renew by using
In 2019, I spent about a month to write this Python cryptocurrency capital gain tax calculator.
I created a gist to keep a basic implementation, in Python. Here it is: https://gist.github.com/viewplatgh/cb690159e8ee028cb4c9483cb127e6c3
Github Pages + Jekyll is free and reliabe. And it’s fun to use it to make a website.