Photo by Volodymyr Hryshchenko on Unsplash

REACT HOOK SERIES

React useDebugValue

Kendi Custom Hook yazdınız ve bu Custom Hook component ile ilgili bilgilerin React DevTools içerisinde gösterilmesini istiyorsunuz. Aşağıdaki komut ile bunu basitçe yapabilirsiniz.

useDebugValue(value)

Örneğin kendi custom Hover Hook yazmış olalım. Bunun içerisinde useDebugValue ile mevcut durumu yazdırırsak..

useHover Custom Hook

Örneğin Mavi Bileşenin üzerine Hover ettiğimizde bunun durumunu React DevTools da hooks altında property olarak gösterebiliriz.

React DevTools

Source Kod

GitHub kodu

Referanslar

Okumaya Devam Et 😃

Bu yazının devamı veya yazı grubundaki diğer yazılara erişmek için bu linke tıklayabilirsiniz.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store