Hide/Show components in react native

后端 未结 24 2021
囚心锁ツ
囚心锁ツ 2020-12-07 08:43

I\'m really new to React Native and I\'m wondering how can I hide/show a component.
Here\'s my test case:



        
24条回答
  •  眼角桃花
    2020-12-07 09:20

    If you want to hide it but keep the space occupied by the component like css's visibility: hidden setting in the component's style opacity: 0 should do the trick.

    Depending on the component other steps in disabling the functionality might be required as interaction with an invisible item is possible.

提交回复
热议问题