useLayoutEffect | Simple React Hooks

preview_player
Показать описание
How useLayoutEffect works in React #react #reactjs #reactjsdeveloper #programming #progammer #frontend #coding #code
Рекомендации по теме
Комментарии
Автор

If you have redirection logic that can be in uselayouteffect for better Ui rendering.

dhruvsakariya
Автор

In this case you should avoid using useEffect, instead use a function or an arrow function which depends on the state

davealma
Автор

Sadly this is unavailable in Server side components in next.js, I wish there was an alternative

Wassim
Автор

The premise is sound but the example isn't the best illustration. isAdmin should be derived in component scope, not in state. This is a common footgun so it's more important to impress that not everything should be in state.

fifty-plus
Автор

I am inspired making web app using react thanks to you❤.

devDon