ppotatoG


Back to all posts

React render twice

Written by ppotatoG & Posted on October 9th, 2022

React.StrictMode 로 감싸져 있을 때 개발모드에서만 두번씩 호출 실제 프로덕트에는 정상적으로 작동

twice

<React.StrictMode>
<div>
<ComponentOne />
<ComponentTwo />
</div>
</React.StrictMode>

once

<div>
<ComponentOne />
<ComponentTwo />
</div>

https://ko.reactjs.org/docs/strict-mode.html

https://all-dev-kang.tistory.com/entry/리액트-두번-렌더링-되는-이슈에-대하여FeatStrictMode


Posted on October 9th, 2022