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

Fixes Loading Page Timer Reference #274

Merged
merged 1 commit into from
May 12, 2020
Merged

Conversation

mattxwang
Copy link
Member

As Leo gave his presentation with our code snippet, I realized that our code was not written the way it was intended.

Currently in master, we had namespaced our timer in this.setState.timer - not technically non-compiling code, but probably not what was intended.

Instead, this PR moves the timer outside of state (since instantiating or re-calling the timer itself doesn't warrant a refresh), and moves it to a var called this.timer.

This should be a simple refactor that causes no functionality changes. We should test to verify this!

Surprised I didn't catch this earlier - my fault!
@mattxwang mattxwang requested a review from krashanoff May 12, 2020 02:31
Copy link
Contributor

@krashanoff krashanoff left a comment

Choose a reason for hiding this comment

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

Just tested locally, works as intended and LGTM.

Maybe I have a knack for picking gnarled code to use in my presentations. 🤔

@krashanoff krashanoff merged commit 6314530 into master May 12, 2020
@krashanoff krashanoff deleted the patching-wrong-set-state branch May 12, 2020 20:56
@krashanoff krashanoff added the bug Something isn't working label May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants