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

Refactor 2 #20

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

Refactor 2 #20

wants to merge 1 commit into from

Conversation

michaeltintiuc
Copy link
Member

This is the second step of refactoring:

  • Standardize our components
  • Simplify rendering
  • Remove some of the direct DOM access
  • Added cleanup code

All of our components share the same basic properties of left and top meaning that we've just laid the foundation for one of the next steps, leveraging HOC and utlity functions, it is much easier to work with those if we standardize our code.

We've also removed a good chunk of conditionals by using basic arithmetic for rendering animation frames

We've replaced fetching canvases by ID with useRef

We've also added cleanup code to our useEffect where we clear our timeouts and intervals.

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.

1 participant