Browser window crashes

You can disable the preview to prevent the browser window crashing while you fix this issue by adding a query parameter to the URL before opening up the app like this: https://databutton.com/projects/<your-project-id>?preview-disabled=true

Issue

If you are experiencing that the browser window crashes when you are looking at one of the pages of your app, it often indicates that you have something in one of your pages or UI components that is looping when the element is rendered into view. This is called an infinite loop in React.

Resolution

First you have to identify what page this is happening on. Navigate between your pages and take note of which pages are working as expected, and which are causing the browser window to freeze. The browser window might not freeze immediately, so stay on each page for a little while.

When you have found what page(s) has this issue, navigate to a page WITHOUT this issue and send this prompt to your agent.

I notice that when I am on page X, the browser slows down and eventually crashes.
Can you inspect the code for page X and investigate if there are anything on the page
causing an infinite loop such as a useEffect or passed props? Summarize your findings
and create a task for resolving this issue and then start working on that task.

Last updated

Was this helpful?