Magento 2 PWA Update <title> in custom component
-
14-04-2021 - |
해결책
To update <title>
tag in custom component:
import { Meta, Title } from 'location-to-head-component/lib/components/Head'
;
Then return:
return (
<>
<Title>you-title-here - {yourVar}</Title>
//page content here
</>
);
OR:
useEffect(() => {
document.title = 'you-title-here - '+yourVar;
}, [title]);
제휴하지 않습니다 magento.stackexchange