00:00Hello, welcome to React FEQs. Let's see the next question. Another important question for
00:07interviews is, what is difference between use effect and use layout effect? It's a little bit
00:14experience question. Use effect and use layout effect are the hooks available in React. Use
00:21effect usually executes after the paint process in the HTML parsing. You know that HTML parsing
00:29has various phases. People write the code, markup, characters, tokens, dome, layout, rendering
00:38and paint. Paint is the final process. Usually use effect will work after the paint process.
00:45Use layout effect will work before the paint process. After the layout is generated, this
00:51use layout effect works. Usually we use this for handling the dome, not about the virtual
00:58dome. So make sure that when you are using any interaction related to dome, better configure
01:04that in use layout effect. Use effect is good for the virtual dome. Thank you.
Comments