JS React short circuit for onpress

后端 未结 0 534
攒了一身酷
攒了一身酷 2020-12-07 07:52

I want to disable "onPress" if a parameter isEnabled === false,

works like:

const RightTitle = ({children, onPress, isEnabled}) => (
  <         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题