logo

[개발일기] react-helmet 사용하기

language-logoReactJS

• react-helmet은 React.js에서 웹 문서의 head 값을 변경할 때 사용하는 컴포넌트이다.
• react-helmet을 설치하기 위해서는 npm을 통해 'npm i --save react-helmet' 명령어를 사용한다.
• react-helmet을 사용하여 웹 문서의 title을 변경할 수 있다. 이는 크롤러에 잡히지 않는 동적인 변경이다.
• 예를 들어, 'import {Helmet} from "react-helmet";'와 같이 import 한 후, '<Helmet> <title>velog</title> </Helmet>'와 같이 사용하여 웹 문서의 title을 'velog'로 변경할 수 있다.

thumbnail
북마크
공유하기
신고하기
1분 분량
조회수 263
profile-image송우든
2년 전
Copyright © 2025. Codenary All Rights Reserved.