Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: testing-library/react-hooks-testing-library
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.1.0
Choose a base ref
...
head repository: testing-library/react-hooks-testing-library
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.1.1
Choose a head ref
  • 13 commits
  • 7 files changed
  • 7 contributors

Commits on Mar 2, 2021

  1. chore(deps-dev): bump kcd-scripts from 7.7.0 to 8.0.2 (#572)

    Bumps [kcd-scripts](https://github.com/kentcdodds/kcd-scripts) from 7.7.0 to 8.0.2.
    - [Release notes](https://github.com/kentcdodds/kcd-scripts/releases)
    - [Changelog](https://github.com/kentcdodds/kcd-scripts/blob/main/CHANGELOG.md)
    - [Commits](kentcdodds/kcd-scripts@v7.7.0...v8.0.2)
    
    Signed-off-by: dependabot[bot] <[email protected]>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 2, 2021
    Copy the full SHA
    8e72ad1 View commit details

Commits on Mar 5, 2021

  1. chore(deps-dev): bump typescript from 4.2.2 to 4.2.3 (#573)

    Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.2.2 to 4.2.3.
    - [Release notes](https://github.com/Microsoft/TypeScript/releases)
    - [Commits](https://github.com/Microsoft/TypeScript/commits)
    
    Signed-off-by: dependabot[bot] <[email protected]>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 5, 2021
    Copy the full SHA
    bb0108c View commit details
  2. Fix typos (#577)

    mvasin authored Mar 5, 2021
    Copy the full SHA
    456f8e2 View commit details
  3. docs: add mvasin as a contributor (#578)

    * docs: update README.md [skip ci]
    
    * docs: update .all-contributorsrc [skip ci]
    
    Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
    allcontributors[bot] authored Mar 5, 2021
    Copy the full SHA
    10093b3 View commit details

Commits on Mar 9, 2021

  1. chore(deps-dev): bump kcd-scripts from 8.0.2 to 8.1.0 (#579)

    Bumps [kcd-scripts](https://github.com/kentcdodds/kcd-scripts) from 8.0.2 to 8.1.0.
    - [Release notes](https://github.com/kentcdodds/kcd-scripts/releases)
    - [Changelog](https://github.com/kentcdodds/kcd-scripts/blob/main/CHANGELOG.md)
    - [Commits](kentcdodds/kcd-scripts@v8.0.2...v8.1.0)
    
    Signed-off-by: dependabot[bot] <[email protected]>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 9, 2021
    Copy the full SHA
    5bae466 View commit details

Commits on Mar 15, 2021

  1. chore(deps-dev): bump eslint from 7.21.0 to 7.22.0 (#580)

    Bumps [eslint](https://github.com/eslint/eslint) from 7.21.0 to 7.22.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
    - [Commits](eslint/eslint@v7.21.0...v7.22.0)
    
    Signed-off-by: dependabot[bot] <[email protected]>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 15, 2021
    Copy the full SHA
    27c170f View commit details

Commits on Mar 17, 2021

  1. chore(deps-dev): bump kcd-scripts from 8.1.0 to 8.1.1 (#581)

    * chore(deps-dev): bump kcd-scripts from 8.1.0 to 8.1.1
    
    Bumps [kcd-scripts](https://github.com/kentcdodds/kcd-scripts) from 8.1.0 to 8.1.1.
    - [Release notes](https://github.com/kentcdodds/kcd-scripts/releases)
    - [Changelog](https://github.com/kentcdodds/kcd-scripts/blob/main/CHANGELOG.md)
    - [Commits](kentcdodds/kcd-scripts@v8.1.0...v8.1.1)
    
    Signed-off-by: dependabot[bot] <[email protected]>
    
    * chore: update lint config to disable stylistic typesctipt rules
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Michael Peyper <[email protected]>
    dependabot[bot] and mpeyper authored Mar 17, 2021
    Copy the full SHA
    bc7cda2 View commit details

Commits on Mar 23, 2021

  1. Copy the full SHA
    1dd5d17 View commit details
  2. chore(deps-dev): bump react from 17.0.1 to 17.0.2 (#583)

    Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) from 17.0.1 to 17.0.2.
    - [Release notes](https://github.com/facebook/react/releases)
    - [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
    - [Commits](https://github.com/facebook/react/commits/v17.0.2/packages/react)
    
    Signed-off-by: dependabot[bot] <[email protected]>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Michael Peyper <[email protected]>
    dependabot[bot] and mpeyper authored Mar 23, 2021
    Copy the full SHA
    33f708a View commit details

Commits on Mar 24, 2021

  1. Fixed a typo (#584)

    agjs authored Mar 24, 2021
    Copy the full SHA
    b7ec6cb View commit details
  2. docs: add agjs as a contributor (#585)

    * docs: update README.md [skip ci]
    
    * docs: update .all-contributorsrc [skip ci]
    
    Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
    allcontributors[bot] authored Mar 24, 2021
    Copy the full SHA
    f480f74 View commit details

Commits on Mar 29, 2021

  1. chore(deps-dev): bump eslint from 7.22.0 to 7.23.0 (#586)

    Bumps [eslint](https://github.com/eslint/eslint) from 7.22.0 to 7.23.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
    - [Commits](eslint/eslint@v7.22.0...v7.23.0)
    
    Signed-off-by: dependabot[bot] <[email protected]>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 29, 2021
    Copy the full SHA
    3d2e0d8 View commit details
  2. Copy the full SHA
    ef2daaf View commit details
Showing with 41 additions and 10 deletions.
  1. +27 −0 .all-contributorsrc
  2. +3 −1 .eslintrc
  3. +3 −1 README.md
  4. +1 −1 docs/introduction.md
  5. +1 −1 docs/usage/ssr.md
  6. +5 −5 package.json
  7. +1 −1 src/pure.ts
27 changes: 27 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -483,6 +483,33 @@
"contributions": [
"doc"
]
},
{
"login": "mvasin",
"name": "Mikhail Vasin",
"avatar_url": "https://avatars.githubusercontent.com/u/12434833?v=4",
"profile": "https://www.linkedin.com/in/mike-vasin/",
"contributions": [
"doc"
]
},
{
"login": "agjs",
"name": "Aleksandar Grbic",
"avatar_url": "https://avatars.githubusercontent.com/u/7226555?v=4",
"profile": "https://aleksandar.xyz",
"contributions": [
"doc"
]
},
{
"login": "yoniholmes",
"name": "Jonathan Holmes",
"avatar_url": "https://avatars.githubusercontent.com/u/184589?v=4",
"profile": "https://github.com/yoniholmes",
"contributions": [
"code"
]
}
],
"skipCi": true,
4 changes: 3 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -8,7 +8,9 @@
"import/no-unresolved": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-invalid-void-type": "off"
"@typescript-eslint/no-invalid-void-type": "off",
"@typescript-eslint/non-nullable-type-assertion-style": "off",
"@typescript-eslint/sort-type-union-intersection-members": "off"
},
"parserOptions": {
"project": ["./tsconfig.json", "./scripts/tsconfig.json"]
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -42,7 +42,6 @@
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [The problem](#the-problem)
- [The solution](#the-solution)
- [When to use this library](#when-to-use-this-library)
@@ -236,6 +235,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
</tr>
<tr>
<td align="center"><a href="https://seanbaines.com/"><img src="https://avatars.githubusercontent.com/u/24367010?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sean Baines</b></sub></a><br /><a href="https://github.com/testing-library/react-hooks-testing-library/commits?author=mrseanbaines" title="Documentation">📖</a></td>
<td align="center"><a href="https://www.linkedin.com/in/mike-vasin/"><img src="https://avatars.githubusercontent.com/u/12434833?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mikhail Vasin</b></sub></a><br /><a href="https://github.com/testing-library/react-hooks-testing-library/commits?author=mvasin" title="Documentation">📖</a></td>
<td align="center"><a href="https://aleksandar.xyz"><img src="https://avatars.githubusercontent.com/u/7226555?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aleksandar Grbic</b></sub></a><br /><a href="https://github.com/testing-library/react-hooks-testing-library/commits?author=agjs" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/yoniholmes"><img src="https://avatars.githubusercontent.com/u/184589?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jonathan Holmes</b></sub></a><br /><a href="https://github.com/testing-library/react-hooks-testing-library/commits?author=yoniholmes" title="Code">💻</a></td>
</tr>
</table>

2 changes: 1 addition & 1 deletion docs/introduction.md
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ the results.

### When to use this library

1. You're writing a library with one or more custom hooks that are not directly tied a component
1. You're writing a library with one or more custom hooks that are not directly tied to a component
2. You have a complex hook that is difficult to test through component interactions

### When not to use this library
2 changes: 1 addition & 1 deletion docs/usage/ssr.md
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ to use SSR semantics.

## Hydration

The result of rendering you hook is static are not interactive until it is hydrated into the DOM.
The result of rendering your hook is static and not interactive until it is hydrated into the DOM.
This can be done using the `hydrate` function that is returned from `renderHook`.

Consider the `useCounter` example from the [Basic Hooks section](/usage/basic-hooks):
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -58,14 +58,14 @@
"docz": "2.3.1",
"docz-theme-default": "1.2.0",
"docz-utils": "2.3.0",
"eslint": "7.21.0",
"kcd-scripts": "7.7.0",
"eslint": "7.23.0",
"kcd-scripts": "8.1.1",
"prettier": "^2.2.1",
"react": "17.0.1",
"react": "17.0.2",
"react-dom": "^17.0.1",
"react-test-renderer": "17.0.1",
"react-test-renderer": "17.0.2",
"ts-node": "^9.1.1",
"typescript": "4.2.2"
"typescript": "4.2.3"
},
"peerDependencies": {
"react": ">=16.9.0",
2 changes: 1 addition & 1 deletion src/pure.ts
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ function hasDependency(name: string) {
try {
require(name)
return true
} catch {
} catch (error) {
return false
}
}