Skip to content

Conversation

TheHaff
Copy link
Contributor

@TheHaff TheHaff commented Mar 16, 2023

Thought I'd open a pr with what I had so far, in case anyone knows how to fix the last issue.

  • Bump to React 18
  • Migrate away from deprecated testing-library/react-hooks

TODO:

  • Had to skip one test in useIsClient since i couldn't figure out ssr and hydration yet.


// TODO: currently don't know how to simulate hydration of hooks.
describe('useIsClient()', () => {
it.skip('should be false when rendering on the server', async () => {
Copy link
Contributor Author

@TheHaff TheHaff Mar 16, 2023

Choose a reason for hiding this comment

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

Any help here would be appreciated

Copy link
Owner

Choose a reason for hiding this comment

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

For now, we haven't any clear direction about that

testing-library/react-testing-library#1120

Copy link
Owner

@juliencrn juliencrn left a comment

Choose a reason for hiding this comment

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

Hi, nice add, we will merge it when we'll be able to test both CSR and SSR. Thanks!


// TODO: currently don't know how to simulate hydration of hooks.
describe('useIsClient()', () => {
it.skip('should be false when rendering on the server', async () => {
Copy link
Owner

Choose a reason for hiding this comment

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

For now, we haven't any clear direction about that

testing-library/react-testing-library#1120

@juliencrn
Copy link
Owner

usehooks-ts changed since your PR, I rebased it to the latest master commit but I can't push it on your repo

@TheHaff TheHaff closed this Jun 12, 2023
@changeset-bot
Copy link

changeset-bot bot commented Jun 12, 2023

🦋 Changeset detected

Latest commit: b0002f7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
usehooks-ts Patch
eslint-config-custom Patch
www Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@TheHaff TheHaff reopened this Jun 12, 2023
@vercel
Copy link

vercel bot commented Jun 12, 2023

Someone is attempting to deploy a commit to a Personal Account owned by @juliencrn on Vercel.

@juliencrn first needs to authorize it.

TheHaff and others added 9 commits January 30, 2024 00:33
Migrate away from deprecated testing-library/react-hooks
Had to skip one test in useIsClient since i couldn't figure out ssr and hydration yet.
- fix typo in useCopyToClipboard
- improve useInterval speed using fake timer
- remove noise by dropping tests on the depreciated interface of useCountdown
@juliencrn juliencrn changed the title Upgrade to react 18. [WIP] ⬆️ Upgrade to react 18, latest @testing-library and migrate to vitest Jan 29, 2024
@juliencrn
Copy link
Owner

I will merge it finally, nothing happened for useIsClient, we will do it later in another PR.
Thank you @TheHaff 👍

@juliencrn juliencrn merged commit a192167 into juliencrn:master Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants