if you are struggling with integrating helmet title to your project , run this command npm i helmet once installed
simply copy and paste into a new file called TitleComponent.js in the src folder
// TitleComponent.js import React from 'react'; import Helmet from 'react-helmet';
const TitleComponent = ({ title }) => { var defaultTitle = '⚛️ app'; return ( {title ? title : defaultTitle} ); };
export { TitleComponent };
and in your app.js inside return( //paste this !!
) // lets assume that you have a contact page
import {TitleComponent } from './TitleComponent'; paste this into contact page inside a dev tag
Its really confused me from the beginning, let me know if you need any help with this
Happy Codding :)
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
if you are struggling with integrating helmet title to your project , run this command npm i helmet
once installed
simply copy and paste into a new file called TitleComponent.js in the src folder
// TitleComponent.js
import React from 'react';
import Helmet from 'react-helmet';
const TitleComponent = ({ title }) => {
var defaultTitle = '⚛️ app';
return (
{title ? title : defaultTitle}
);
};
export { TitleComponent };
and in your app.js inside return(
//paste this !!
)
// lets assume that you have a contact page
import {TitleComponent } from './TitleComponent';
paste this into contact page inside a dev
tag
Its really confused me from the beginning, let me know if you need any help with this
Happy Codding :)