N
N
Nikita2021-08-10 00:33:42
React
Nikita, 2021-08-10 00:33:42

What is the cause of the application error on ios browsers?

In order not to really bring tons of code, we abstract from it and take a purely theory.

There is an application on react, at some point it happens

// ... тут запрос с сервера на получение данных, который выполняется синхронно, через промисы
// переменная result - это ответ от сервера
const result  = 'string'

localStorage.setItem('result', result);
document.location.pathname = /


The page is reloaded and in the App.js component, a request is made to the server, which uses the header written based on the result.

So on mobile devices (iPhones) in all browsers after these steps a white screen appears. With what it can be connected?

There is an assumption that there is a jamb in the local storage, which causes an error in production. After all, a white screen is a characteristic feature for a Reakt build in case of an error.

Any thoughts on what is causing this?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question