简体   繁体   中英

Does hidden component in react native send request to server?

I wonder how react native works if component is hidden. For example in this code

{visible && <RkModalImg rkCardImg renderFooter={this._renderHeader} source={{ uri: PhotoURL }} />}

If visible variable is equal to false does it send request to server ?

In general in javascript, if you do this:

const x = b && b.name // this means if b has value execute b.names otherwaise x will be null

in your case, the component will not get rendered which means it will not execute anything(component doesn't exist).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM