Loading...
アイコン

Developers Unity

チャンネル登録者数 38人

193 回視聴 ・ 5いいね ・ 2024/03/21

here are depth explanation about react hooks.


useid():

useid is a react hook for generating unique IDs that can be passed to accessibility attributes. accessibility attributes let you specify that two tags are related to each other where use useid() generated id instead of hardcoding them.


useState():

useState is a react hook that lets you add a state variable to you component which returns an array with exactly two values.

1. current State

2. set function


useRef():

useref is a react hook that lets you reference a value that's not needed for rendering. basically its like usestate but the only difference is useref doesn't cause a re_render when the value changes.


useMemo()

useMemo is a react hook that lets you cache the result of a calculation between re_renders in your react application.


useEffect():

useEffect is a react hooks that lets you perform side-effects in the component to the outside world.


useCAllback():

useCallback is a react hook that lets you cache a function definition between re-renders. useCallback cache a function and useMemo cache a value\result of a calculation.


useContext is a react hook that lets you read and subscribe to context from your component just like a data store(redux). useContext hook mets you to read the data useContext in a context which is a data store.

コメント

コメントを取得中...

コントロール
設定

使用したサーバー: directk