My object here isn’t explain how each hook works, my object is explain how use hook to get best performance and some tricks that I learned with life. I ever search how is the right way to use the hooks and it is very hard to find the answers so I decided share this knowledge.
All React codes are functions, their has life cycle, when the component render all variables (except hooks) are recreate so if you need to keep a value you need to use “useState” for it, look next code:
About