Is there any chance to use a component as a global ActivityIndicator which has transparent color and had been created by me on React-Native?
Details:
- I use a redux store to update the UI. So I intend to show an ActivityIndicator by updating the store.
- I've created an
ActivityIndicator
component with nameActIndicator
. - I have a main
App
component that contains the app. - I have a
Root
component that wraps theActIndicator
andApp
components.
The ultimate code of render
method of Root
component looks like the following:
render() {
if (this.state.showActivityIndicator) {
return(
<ActIndicator>
<App />
</ActIndicator>
)
}
return (</App>)
}
I've tried several methods but I can not be successful.
I guess my brain is stopped.
I also guess there may be a logic mistake.