fix: Remove @react-hookz/web
peer dependency
#861
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
The
@react-hookz/web
peer dependency might cause issues upgrading Typist to a newer version (especially when running an older version, such is the case for Twist), and the fact of the matter is that we are only using one hook from the whole library, a hook that we can easily copy/paste into Typist code base.That one hook,
useRerender
, was mostly being used by theuseEditor
hook (and also a Storybook component, but we can easily refactor that with a different technique), a fork of the officialuseEditor
from Tiptap to cater to our needs. However, the latest Tiptap versions come with a much betteruseEditor
implementation, making our version redundant. Soon we'll move back to the officialuseEditor
hook, removing the need for@react-hookz/web
.There's no point in keeping the
@react-hookz/web
library around (especially as a peer dependency), and this PR prepares the code baseuseEditor
hook upgrade by removing the library altogether.Important
Although this removes a peer dependency, this is not a breaking change, and consumer apps don't need any changes.
PR Checklist
Test plan