if (componentHasNoState) {
return itsStatelessComponent()
} else if (componentHasSimplePropsState && propsHasNoNestedObjects) {
return itsPureComponent()
} else {
return itsComponent()
}
Created
July 9, 2018 01:24
-
-
Save wulucxy/ef113941a995e59eeeceb8d293e8f4a4 to your computer and use it in GitHub Desktop.
组件适用场景 #React
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment