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

Switch to hook-based implementation #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

andrewgreenh
Copy link
Collaborator

Currently, this library only offers support for render props.
To offer more flexibility, the base features can be implemented using the useSubscribable hook.
With this, the Subscribe component becomes much shorter.

Additionally, this PR fixes warnings for unsafe lifecycle methods (since no more class components are beeing used).

Even if the API and the behavior of the Subscribe Component stays exactly the same, this is still a breaking change, since we had to bump the Version of React.

(to test hook-based components, enzyme and the development react version had to be bumped and shallow rendering could not be used anymore, since enzyme fires effects only in full rendering)

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