diff --git a/.all-contributorsrc b/.all-contributorsrc index 9062caf4..26995810 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -83,6 +83,16 @@ "doc", "ideas" ] + }, + { + "login": "josepot", + "name": "Josep M Sobrepere", + "avatar_url": "https://avatars1.githubusercontent.com/u/8620144?v=4", + "profile": "https://github.com/josepot", + "contributions": [ + "doc" + ] } - ] + ], + "commitConvention": "none" } diff --git a/README.md b/README.md index 517f66a1..bdbba68f 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ [](http://www.npmtrends.com/react-hooks-testing-library) [](https://github.com/mpeyper/react-hooks-testing-library/blob/master/LICENSE.md) -[](#contributors) +[](#contributors) [](http://makeapullrequest.com) [](https://github.com/mpeyper/react-hooks-testing-library/blob/master/CODE_OF_CONDUCT.md) @@ -67,8 +67,8 @@ import { useState, useCallback } from 'react' function useCounter() { const [count, setCount] = useState(0) - const increment = useCallback(() => setCount(count + 1), [count]) - const decrement = useCallback(() => setCount(count - 1), [count]) + const increment = useCallback(() => setCount((x) => x + 1), []) + const decrement = useCallback(() => setCount((x) => x - 1), []) return { count, increment, decrement } } @@ -140,7 +140,7 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds -
Michael Peyper 💻 🎨 📖 🤔 🚇 📦 ⚠️ 🔧 | otofu-square 💻 | Patrick P. Henley 🤔 👀 | Matheus Marques 💻 | Dhruv Patel 🐛 👀 | Nathaniel Tucker 🐛 👀 | Sergei Grishchenko 💻 📖 🤔 |
Michael Peyper 💻 🎨 📖 🤔 🚇 📦 ⚠️ 🔧 | otofu-square 💻 | Patrick P. Henley 🤔 👀 | Matheus Marques 💻 | Dhruv Patel 🐛 👀 | Nathaniel Tucker 🐛 👀 | Sergei Grishchenko 💻 📖 🤔 |
Josep M Sobrepere 📖 |