react-helmet-async icon indicating copy to clipboard operation
react-helmet-async copied to clipboard

Get title defined by Helmet

Open tutods opened this issue 3 years ago • 1 comments

HI Anyway to get the title defined by Helmet? For example, I'm building a dashboard, and my basic layout have the page title on the top.

I'm trying use Helmet to get the title I defined on the page and show it on the layout

Is possible?

tutods avatar Feb 19 '22 14:02 tutods

Hi

I think you should try to define a single source of truth for your page title, and then share it to both Helmet and Layout components via props, state, or whatever. Helmet would become a consumer and not a source of logic for your app, since it hasn't been designed to be used that way.

By doing so, you won't depend too much on Helmet for the feature you're trying to achieve.

soolidtech avatar Mar 02 '22 11:03 soolidtech