Comments (12)
I discovered that if you are using react-navigation and have Stack Navigation nested under Drawer Navigation (my case), the component life cycle will break, and it will never unmount, but new screens will be pushed to the top. This can cause Spinner to show up on screens and components it doesn't belong to. It technically does, because the component never unmounted.
from react-native-loading-spinner-overlay.
I should add that I was experiencing this issue and was not using react-navigation in my project.
from react-native-loading-spinner-overlay.
Same here
from react-native-loading-spinner-overlay.
I'm having the same issue, any solutions out there?
from react-native-loading-spinner-overlay.
Same here.
from react-native-loading-spinner-overlay.
@TarikFojnica this is the same issue i've had with it, I am also using react-navigation.
from react-native-loading-spinner-overlay.
@TarikFojnica this is happening for me too. Any solution ?
from react-native-loading-spinner-overlay.
@Mbotes @weslley39 Not really a solution because I did not have time to dig deeper into the issue, but you can always go back to use DrawerNavigator only, without nesting StackNavigator. That will solve this specific issue but you will loose the StackNavigator features.
I would be happy to hear a real solution too because this is not a particular react-native-loading-spinner-overlay, but rather a react-navigation issue.
from react-native-loading-spinner-overlay.
@tbarsbay You can test if your componentWillUnmount
function works properly in the component containing the spinner (or the main screen component). If does not, that is where the problem lies and you can track it from there.
I think the origin of the problem is the same. It's just that something else causes it in your case.
from react-native-loading-spinner-overlay.
Any solution for it?
from react-native-loading-spinner-overlay.
Use a timeout before navigating to the next screen, for example
if(responseJson.msg === "not user login"){ this.setState({ isLoading: false, showCartModal: false, }) setTimeout(() => { Actions.login({type: 'reset', status: 0}) }, 1000)
that's it!
from react-native-loading-spinner-overlay.
I'm documenting recommended implementation approach in the README shortly
from react-native-loading-spinner-overlay.
Related Issues (20)
- When i navigate to another screen and at that screen i have used spinner but its not working
- After dismissing the spinner, I can't tap on anything HOT 4
- No longer works with RN 0.63.2 HOT 1
- Font Family HOT 3
- Spinner is not staying on screen and may be causing a function to not work. Please help!
- Cancelable Spinner not work HOT 4
- Is it really for React-Native? HOT 1
- Dismissing spinner also dismisses modal HOT 3
- App unresponsive on iOS 15 after enabling then disabling HOT 6
- 2.0.0 to 3.0.0 migration? HOT 34
- Host key verification failed fatal: Could not read from remote repository.
- fixing android navigation bar popping up in apps that don't use it HOT 2
- Animation does not work
- example is missing code for CHILDREN
- can't style the View around the Text
- Need Callback: once completely stops spinner loading, we need one callback function. HOT 1
- in 0.62 it's not working well. HOT 3
- Is it possible to support onPress ? HOT 1
- Spinner is not spinning on specific Android device HOT 2
- Support "statusBarTranslucent" by upgrading to latest react native HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-loading-spinner-overlay.