can i check which component triggers useEffect?
See original GitHub issueDo you want to request a feature or report a bug? Feature (maybe i’m not sure)
What is the current behavior? Can’t find a way to check “which component/function/method that updates state” from useEffect
What is the expected behavior?
I have a range slider input that takes progress state as value. That progress state updated from <audio>:ontimeupdate()
event handler.
I need to arrange range that slider to update progress state. I’m trying to make this with useEffect
but when <audio>:ontimeupdate()
runs, useEffect
gets triggered and slider got stuck.
Can i check what component, function or method changes state and get it from useEffect
?
Versions: React: 16.7.0-alpha.0 ReactDOM: 16.7.0-alpha.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
In useEffect hook, how to find out what event triggered state ...
The main problem is that state can be changed by multiple events, and I can't tell which event triggered the state change. reactjs...
Read more >How the useEffect Hook Works (with Examples) - Dave Ceddia
After rendering finishes, useEffect will check the list of dependency values against the values from the last render, and will call your effect ......
Read more >Using the Effect Hook - React
What does useEffect do? By using this Hook, you tell React that your component needs to do something after render. React will remember...
Read more >The last guide to the useEffect Hook you'll ever need
With useEffect , you invoke side effects from within functional components, which is an important concept to understand in the React Hooks era....
Read more >Trigger Effects With useEffect - OpenClassrooms
Use useEffect to perform effects: it lets your component run actions after rendering, choosing when this action should be run. · The hook ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Can you provide a demo please? Like in CodeSandbox.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!