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

Avoided repetative calling of the customhook #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hariharan-ingersal
Copy link

Resolves #1 by using a varible IS_TITLE_CHANGE_RUNNING on windows object to track whether a title/favicon animation is already triggered or not.

@hariharan-ingersal hariharan-ingersal changed the title Avoided repetative calling of the customhook - closes #1 Avoided repetative calling of the customhook Oct 2, 2021
@hariharan-ingersal hariharan-ingersal marked this pull request as ready for review October 2, 2021 19:26
Copy link
Owner

@princefishthrower princefishthrower left a comment

Choose a reason for hiding this comment

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

Didn't see this until after writing my comment. Looks like a good start.

  • Please reencapsulate the const id into this new variable - the variable value should toggle between undefined and the Interval ID, and we shouldn't need a const id anymore.
  • Let's use LocalStorage instead of the window object, since we are using it elsewhere now in the code and window is troublesome with TypeScript (with those as anys).
  • Finally, make sure the differences between dev and prod are employed - in dev this should throw a new Error()

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.

Prevent Repeat Calls of usePleaseStay
2 participants