# 如何实现一个 react hook,你有没有自己写过一个
Issue
欢迎在 Gtihub Issue 中回答此问题: Issue 153 (opens new window)
Author
可以参考官方文档 https://reactjs.org/docs/hooks-custom.html (opens new window)
自定义一个 hook
仅仅是一个以 use
打头,组合 useState
和 useEffect
或者其它 hooks
的一个普通函数
Author
各种优秀实现=》https://github.com/streamich/react-use
Author
各种优秀实现=》https://github.com/streamich/react-use
这个厉害!