part 1: 举了isLoading的例子
part 2: react里 &&的使用
下图: 左边 && 右边
左 == true, 执行右边
左 == false, 什么都不做
image.png
concise way to reverse the boolean:就把跟prevstate取否给我就行了
image.png
part 1: 举了isLoading的例子
part 2: react里 &&的使用
下图: 左边 && 右边
左 == true, 执行右边
左 == false, 什么都不做
concise way to reverse the boolean:就把跟prevstate取否给我就行了