const withLoading = Component => ({ isLoading, ...rest }) => isLoading ? <Loading /> : <Component { ...rest } />const ButtonWithLoading = withLoading(Button)
render里:
<ButtonWithLoading isLoading={false}> More</ButtonWithLoading>
结果:页面展示效果正常 但tools里有异常 详见下图
白衣染霜花