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

update package to hooks #29

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

Conversation

chescalante
Copy link

Hi @shahnawaz, I'm sending you this pull request with changes for adapting the package for hooks.

Highlights:

  1. Component props are now deconstructed in the component function definition. I believe this way is more readable and easy to change.
  2. defaultProps it is now removed, it can be placed directly when the props are deconstructed. Same benefits as in 1.
  3. I took componentDidMount, componentWillUnmount, _startLineAnimation and _animateLoop and replaced it with useEffect: allowing start and re-start an animation when parameters change or when the component is mounted.

Let me know what you think

@shahnawaz
Copy link
Owner

Hi @chescalante

Thank you for this amazing update.

I'll review and get back to you.

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.

None yet

2 participants