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

Use hooks #8

Closed
wants to merge 2 commits into from
Closed

Use hooks #8

wants to merge 2 commits into from

Conversation

Vitormdias
Copy link
Contributor

In this branch I replaced the plug HOC implementation to use react hooks, I've used useState e useEffect and eliminated unnecessary code. I'd also removed the lifecycle object that we received, because since we use hooks now, whoever uses the plug can implement useEffect in his functional components instead of passing it to us, so the person using the plug HOC has more control of his implementation

@Vitormdias Vitormdias added the enhancement New feature or request label Apr 12, 2019
@Vitormdias Vitormdias self-assigned this Apr 12, 2019
@Vitormdias
Copy link
Contributor Author

Solves issue #8

Copy link
Contributor

@filipeversehgi filipeversehgi left a comment

Choose a reason for hiding this comment

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

This way we would not support older versions of React.
Try to put the Hooks Plug Proposal inside a usePlug custom hook, and leave the HOC the way it was using Class Components.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants