a full stack enthusiast interested in Javascript / Typescript / Kotlin / Python / React / React Native / (Android & iOS) native / Cloud

0%

The hard part of this is, the official Google sign-in is using a script tag in your HTML and initialize it using the traditional in-browser vanilla JavaScript, which is not happening in React. And make it a little bit harder to make the two works together.

Read more »

So I just encountered a problem where I want to make a better type checking in a props of a React component. It’s about one prop takes an array of certain type X, and in another prop: callback, this type X needs to be the parameter of the callback. Let’s see how to do that in TypeScript.

Read more »

I’ve heard mobx-state-tree for a while. Today I looked into it, and found it’s pretty lovely. Kind of the fat model pattern. Where it could make the code much more cleaner and far more less boilerplate compare to redux. Today, let’s see how to make nested level in mobx-state-tree.

Read more »

Styled components will be good if you use it from start, but things could be tricky in terms of mixing it up with other libraries or even your own code. Today, I will show you how to use styled components to generate css class and pass it to the 3rd party lib or your own component.

Read more »

There are times when some data is updated, you want to update multiple UI, be them activities or fragments. You can update them manually but that code will look messy. Or you can use the observable pattern to update the UI every time the source data gets updated. Today I will show you how to use MVVM and ViewModel + LiveData from Google’s new architecture component to achieve this. You can use RxJava to do the same thing. architecture component will be easier and less error-prone. Because they are life-cycle aware.

Read more »