摘要:
TypeScript’s discriminated union types (aka tagged union types) allow you to model a finite set of alternative object shapes in the type system. The c 阅读全文
摘要:
ES6 class with extends and super: How this is written in ES5: We use 'Tree.call(this)' to pass context, 'this' is refer to Maple because of Clourse. T 阅读全文
摘要:
TypeScript 2.0 introduced the readonly modifier which can be added to a property or index signature declaration. It helps prevent against unintended p 阅读全文
摘要:
# Python's list comprehensions are awesome. vals = [expression for value in collection if condition] # This is equivalent to: vals = [] for value in collection: if condition:... 阅读全文
摘要:
This lesson introduces the --strictNullChecks compiler option and explains how non-nullable types differ from nullable types. It also illustrates how 阅读全文
摘要:
The takeway is to know when we should cache the content? When we should clean the caches? 1. When should cache the content? This should be done in the 阅读全文
摘要:
In this lesson we will use Animated.spring and TouchableWithoutFeedback to animate the scale of a button in our React Native application. We will use 阅读全文
摘要:
In Single Page Apps we're used to fetch the data on event callbacks. That disables the capacity to use the URL to share it to someone else and get to 阅读全文
摘要:
For example, what you want to do is navgiate from current item to next or previous item. In your component, you can dispatch action like this: So here 阅读全文