question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Infinite rerender on no-code example on CodeSandbox

See original GitHub issue

What you were expecting:

The codesandbox should not keep rerendering the view

What happened instead:

the view gets rerendered infinitely

Steps to reproduce:

Create a sandbox using https://github.com/marmelab/react-admin/tree/next/examples/no-code

Related code:

https://codesandbox.io/s/github/marmelab/react-admin/tree/next/examples/no-code?file=/vite.config.ts

Other information:

Environment

  • React-admin version: 4.0.0-rc.0
  • Last version that did not exhibit the issue (if applicable): 3.19
  • React version:
  • Browser: Edge 99
  • Stack trace (in case of a JS error):

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
smeng9commented, Apr 1, 2022

Hi @slax57 Checkout this repo’s config, it is no longer having infinite loop, can you also verify if the local one works fine for you? https://codesandbox.io/s/wandering-wind-zcpkf3?file=/vite.config.ts

0reactions
smeng9commented, Nov 3, 2022

https://codesandbox.io/s/github/marmelab/react-admin/tree/master/examples/no-code seems throws bad gateway for now because vite cannot be found.

Screenshot from 2022-11-03 12-50-25

> Sandbox Container: Starting sandbox v0m0x...
yarn install v1.22.19
warning package.json: No license field
info No lockfile found.
warning no-code@0.0.1: No license field
[1/4] Resolving packages...
warning ra-data-local-storage > ra-data-fakerest > fakerest > babel-runtime > core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage dueto the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
[2/4] Fetching packages...
[-------------------------------------------------------[##########---------------------------------------------[#################--------------------------------------[####################-----------------------------------[#############################--------------------------[####################################################---[#######################################################[#######################################################[#######################################################[#######################################################[#######################################################error @mui/material@5.10.12: The engine "node" is incompatible with this module. Expected version ">=12.0.0". Got "10.24.1"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
> Sandbox Container: Sandbox v0m0x started
yarn run v1.22.19
warning package.json: No license field
$ vite
/bin/sh: 1: vite: not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
yarn run v1.22.19
warning package.json: No license field
$ vite
/bin/sh: 1: vite: not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
yarn run v1.22.19
warning package.json: No license field
$ vite
/bin/sh: 1: vite: not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
yarn run v1.22.19
warning package.json: No license field
$ vite
/bin/sh: 1: vite: not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Huh, I have to fork and change the starting script in https://codesandbox.io/s/pedantic-ully-d1so8d?file=/package.json:64-83 from "dev": "vite", to "dev": "yarn vite", in order to get it work. The infinite rerender loop is indeed resolved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-hint infinite rerender (no bootstrap) - CodeSandbox
CodeSandbox is an online editor tailored for web applications. ... Templatereact-hint infinite rerender (bootstrap); Environmentcreate-react-app.
Read more >
react-infinite examples - CodeSandbox
Learn how to use react-infinite by viewing and forking example apps that make use of react-infinite on CodeSandbox. Highcharts React Simple Chart (forked)Demo ......
Read more >
react-rerender-test examples - CodeSandbox
React Rerender Test Examples. Learn how to use react-rerender-test by viewing and forking example apps that make use of react-rerender-test on CodeSandbox.
Read more >
FAQs - CodeSandbox
You'll need to refresh to see files updated this way. ... it doesn't prevent all scenarios where infinite loops can occur, such as...
Read more >
Configuration - CodeSandbox
infiniteLoopProtection, Whether we should throw an error if we detect an infinite loop, true / false ; hardReloadOnChange, Whether we should refresh the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found