refer to : https://www.npmjs.com/package/react-helmet
Different title can helps user to recognize what content they are browsing now. Which is very important !
Install react-helmet
npm install --save react-helmet
import react-helmet
import { Helmet } from 'react-helmet';
custom title
const TITLE = 'custom-title';
add html code
<Helmet>
<title>{ TITLE }</title>
</Helmet>
Example :
import React, {useEffect} from 'react';
import '../../App.css';
import { Helmet } from 'react-helmet'
const TITLE = 'custom-title';
function ThePage() {
return (
<>
<div className='page-container'>
<Helmet>
<title>{ TITLE }</title>
</Helmet>
<div>
other content ...
</div>
</div>
</>
)
}
export default ThePage;
Top comments (0)