Skip to content

Remove extra dependencies to avoid dead loop of page re-rendering#588

Merged
xiaoyongzhu merged 1 commit into
feathr-ai:mainfrom
enya-yx:enya/console-error
Aug 17, 2022
Merged

Remove extra dependencies to avoid dead loop of page re-rendering#588
xiaoyongzhu merged 1 commit into
feathr-ai:mainfrom
enya-yx:enya/console-error

Conversation

@enya-yx

@enya-yx enya-yx commented Aug 17, 2022

Copy link
Copy Markdown
Collaborator

Description

  • Remove extra dependencies for 'useEffect' and 'useCallback'. These dependencies can cause page re-rendering in a dead loop and infinite console errors would be printed.
  • Add the eslint disable mark to avoid warnings from eslint for these lines

How was this PR tested?

Does this PR introduce any user-facing changes?

  • No. You can skip the rest of this section.
  • Yes. Make sure to clarify your proposed changes.

@jainr jainr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not familiar with eslint but why are we disabling it?

@enya-yx

enya-yx commented Aug 17, 2022

Copy link
Copy Markdown
Collaborator Author

It requires us setting some variables as dependencies. Some of them are not necessary and can cause infinite page re-rending in a dead loop. So the console will keep printing that error message which may cause serious problem.

@xiaoyongzhu xiaoyongzhu merged commit a3e55bf into feathr-ai:main Aug 17, 2022
ahlag pushed a commit to ahlag/feathr that referenced this pull request Aug 26, 2022
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

Successfully merging this pull request may close these issues.

4 participants