0

For example I have View and in this View we have another View2 which is rendered conditionally. So if I will show and hide this View2 1000 times will it affect memory?

<View>
{condtion && <View><Text>2<Text><View>
<View>
rendom
  • 3,417
  • 6
  • 38
  • 49

1 Answers1

0

First react and react-native has a different concept of how classes react to each other. here is more details about that

Also, you can use redux or other statement manager library like mobix flux and another alternative solution you can use props you code in main render function you can create/write a component like this

<ChangeTextComponent condition={you_condition}/> 

When change you condition only render ChangeTextComponent component render.

class AnotherPage_Test extends Component {

  render() {
    return (
        <View>
          <ChangeTextComponent condition={you_condition}/> 
        </View>
    )
  }

}

errorau
  • 2,121
  • 1
  • 14
  • 38