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

Bug: React - Cannot update a component (HotReload) while rendering a different component (TriggerWrapper) #495

Open
vinceve opened this issue Nov 26, 2024 · 0 comments

Comments

@vinceve
Copy link

vinceve commented Nov 26, 2024

It seems that upgrading to the latest react verion and nextjs version following bug occurs:

intercept-console-error.js:56 Cannot update a component (`HotReload`) while rendering a different component (`TriggerWrapper`). To locate the bad setState() call inside `TriggerWrapper`, follow the stack trace as described in https://react.dev/link/setstate-in-render

This is the stack trace:


error	@	intercept-console-error.js:56
scheduleUpdateOnFiber	@	react-dom-client.development.js:14254
dispatchReducerAction	@	react-dom-client.development.js:7112
eval	@	hot-reloader-client.js:432
handleClientError	@	use-error-handler.js:50
error	@	intercept-console-error.js:53
elementRefGetterWithDeprecationWarning	@	react.development.js:446
TriggerWrapper	@	TriggerWrapper.js:19
react-stack-bottom-frame	@	react-dom-client.development.js:22339
renderWithHooks	@	react-dom-client.development.js:5731
updateForwardRef	@	react-dom-client.development.js:7736
beginWork	@	react-dom-client.development.js:9988
runWithFiberInDEV	@	react-dom-client.development.js:544
performUnitOfWork	@	react-dom-client.development.js:14986
workLoopSync	@	react-dom-client.development.js:14816
renderRootSync	@	react-dom-client.development.js:14794
performWorkOnRoot	@	react-dom-client.development.js:14288
performWorkOnRootViaSchedulerTask	@	react-dom-client.development.js:15843
performWorkUntilDeadline	@	scheduler.development.js:44

Note that this happens in a nextjs environment (in combo with ant design)

trigger version: 2.2.5
antd: 5.22.2
nextjs: 15.03
react: 18.3.1

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

No branches or pull requests

1 participant