KO
|
EN
gitlite — search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
useDebug
★ 21
Open GitHub ↗
Custom hook to debug useEffect
Download README (.md)
Explore Similar Repositories
dom-augmentor
:
Same as augmentor but with DOM oriented useEffect handling via dropEffect.
use-custom-compare-effect
:
useEffect hook which takes a comparison function instead of compare using reference equality
react-effect
:
useEffect? use Effect.
use-current-effect
:
useEffect hook with injected current flag
vue-hooks-api
:
在 Vue3 中实现 React 原生 Hooks(useState、useEffect)进而深入理解 React Hooks 的本质原理
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
useDebug
?
Download (.md)
<p align="center"> <img src="https://octodex.github.com/images/daftpunktocat-guy.gif" height="200px"/> <br><br> <b>Custom hook to debug useEffect</b> <br><br> <a href="https://codesandbox.io/s/0qqmmv251w?moduleview=1"/>Codesandbox demo 🔗</a> </p> Based on [Tomasz Łakomy](https://twitter.com/tlakomy)'s [egghead lesson on hooks ](https://egghead.io/lessons/react-use-react-useeffect-hook-to-see-how-many-times-component-mounts-and-unmounts) #### install Uses the `useEffect` hook from React 16.7+ ``` npm install usedebug ``` #### usage ```js import React from "react" const useDebug = require("usedebug") function MyComponent() { useDebug("mycomponent") // call useDebug with an optional id return <div>Hey!</div> } ``` Check the console to see logs ``` __DEBUG_mycomponent__ mounted __DEBUG_mycomponent__ unmounted ``` #### like it? :star: this repo #### license MIT © [siddharthkp](https://github.com/siddharthkp)