Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite rerender on no-code example on CodeSandbox #7453

Closed
smeng9 opened this issue Mar 30, 2022 · 5 comments · Fixed by #8352
Closed

Infinite rerender on no-code example on CodeSandbox #7453

smeng9 opened this issue Mar 30, 2022 · 5 comments · Fixed by #8352
Assignees
Labels

Comments

@smeng9
Copy link
Contributor

smeng9 commented Mar 30, 2022

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):
@slax57 slax57 added the bug label Mar 31, 2022
@slax57
Copy link
Contributor

slax57 commented Mar 31, 2022

Hello!
Thank you for submitting this issue.
This looks like a codesandbox only issue, since I have no problem running the no-code example locally.
We'll look into that and keep you updated!
Cheers

@slax57 slax57 self-assigned this Mar 31, 2022
@smeng9
Copy link
Contributor Author

smeng9 commented 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

@fzaninotto fzaninotto changed the title v4rc0 Infinite rerender on no-code example Infinite rerender on no-code example on CodeSandbox Jul 22, 2022
@smeng9
Copy link
Contributor Author

smeng9 commented Nov 2, 2022

Seems now the codesandbox no longer rerenders infinitely,

but, it still has an error without any console log....

Screenshot from 2022-11-02 15-06-32

Tested against https://codesandbox.io/s/github/marmelab/react-admin/tree/vite-consistent/examples/no-code after vite version bump in #8345

@fzaninotto
Copy link
Member

I managed to launch your last codesandbox without problem:

image

Is your issue coming from CodeSandbox?

@smeng9
Copy link
Contributor Author

smeng9 commented 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 [email protected]: No license field
[1/4] Resolving packages...
warning ra-data-local-storage > ra-data-fakerest > fakerest > babel-runtime > [email protected]: 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/[email protected]: 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants