React Native Modals remains opened when app is refreshed - reactjs

While using the application, if there is a react-native 'modal' opened. I need to explicitly close it before refreshing the app. Else it would stay open and I have restart the app to close it.

It is known bug which happens during development only. Don't worry about it, It won't happen in production app

This is a known bug in react-native, more info here
Based on the discussion in the GitHub thread, looks like the solution is not to be expected soon.

Related

Why did React stop running after saving changes to the code?

During the process of creating a React application, automatic page refresh worked, but today after another day of working on the code, I noticed that when saving any changes in the code, the browser stopped responding to them, and you need to click on refresh the page in order for the changes to become visible.
There are no errors in the console.
What could be the problem?
Git repo: link
There is an issue with some versions of react-script packages that insert an unnecessary document body in the DOM. If this is the problem you can solve it here Github Issue.

updating Reactjs PWA without closing it

I have created an app with ReactJS and now I want to make it a progressive web app. I have seen many tutorials and understood how to do it. But I feel there is one problem that, if the UI of the app is updated then the user needs to close the app(smartphone) or browser tab(desktop) in order to get it updated. This is fine for a smartphone but when opened in a desktop some users might keep the website open in a tab and will never see the updated contents. I read that this not possible because updating this way might break some UI components and hence not allowed.
Is there a way to achieve this without the user needing to close the tab and reopen it?

CRA PWA Service Worker not refreshing

I have create-react-app app that uses its stock service worker to cache files.
I want the app to be a downloadable PWA but whenever I update (with heroku & node expressjs..) the users downloaded app never updates.. Even when I refresh (drag down from top).
Have I missed some configuration in the docs to enable the auto update when its a PWA?
or
What is something I can do to either force refresh when updated. (I have read that's bad UI but I'm fine with that)
Notes:
It works as expected when viewing from a browser on a PC. (updates when tabs are all closed)
I found the solution.
The problem wasn't refreshing the app. I had to permanently close it. by swiping up from the multitask view.
Leaving this here in case anyone else didn't realize

React native component wont update when remote debug

Before Im posting this question, I've tried to look up for answers on google but I could not find the solution to this problem.
I'm developing a react native application, I use redux and react native debugger to check my console and my state.
The issue that I am facing right now is my application wont update to latest changes when expo is debugging the application remotely using React Native Debugger.
Lets say I have a main screen with text "Hello World" and I change my code to "Hello Me", and when I refresh the expo/app, it is still Hello World. I've tried to reset cache, delete expo, recompile but nothing works. I have to disable remote debugging in expo in order to see any changes related to my code.
Does anyone have any idea how to solve this ?
The issue is with React Native Debugger. There is a bug that is likely related to React Native 0.61 and the "fast refresh" feature that is causing the debugger to load stale JS code.
To fix the issue click on the "Network" tab in the debugger and check the "disable cache" option. Now you should see your changes work.
For more info check this out:
https://github.com/jhen0409/react-native-debugger/issues/423
I had this problem using Expo
I managed to solve it, move the device until the settings appear, then disable the "Debug Remote JS" option.

AngularJS app is not loading on Safari (iOS 5.1.1) back button. Any suggestions?

I've ran into an issue with Safari on iOS 5.1.1 and Angular where I am doing paginated results. After I decide to leave the page that is hosting the app, and then come back to the page by using the browser's history back button.
The application is not initialized so as I scroll again, the pagination functionality is not triggered.
Since 5.1.1 doesn't provide a web inspector, I had to rely on console.log to print events that I want to see that it's executing. On initial load, I see everything ok, but when I am back through the back button nothing fires.
My usual ways of fixing this are not working. Here are the things I've tried:
Used manual bootstrapping of Angular app
Made the page not support caching and expire the page as soon as it's rendered.
Neither of these helped, which is why I am here asking for some suggestions. Unfortunately it's not a very easy thing to replicate through a Fiddle or a hosted HTML file so I am unable to provide one. Hoping that some of you may have experienced this before.
Thanks in advance for any help.
Answer is quite late and I hope you found a solution already but it might be useful for others.
Unfortunately I won't be able to answer why the app is not initialized (due to the lack of code) but I can give you some tools/tips to ease the debugging (assuming you have the iOS simulator).
Debuging on mobile safari can be done either :
with weinre and get the features of the web concole,
or by enabling remote debugging in Mobile Safari itself, see here
Yea, same problem here with iOS 7. It must send the DOM structure over before running any javascript. Kinda pointless...
Since the problem is with mobile safari and since it supports popstate event, you can use this event to detect when the user is back in combination with $location.path(), for example:
$(window).bind("popstate", function () {
alert(location.pathname + $location.path());
});

Resources