Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I recently used react helmet for changing title of all route links its perfectly working but the title is not change source code plz resolve this issue #688

Open
Abhishekstudio opened this issue Aug 19, 2022 · 1 comment

Comments

@Abhishekstudio
Copy link

Do you want to request a feature or report a bug?

What is the current behavior?

If the current behavior is a bug,
please provide the steps to reproduce and if
possible a minimal demo of the problem.
Your bug will get fixed much faster if we can run your
code and it doesn't have dependencies other than React and react-helmet.
Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or
CodeSandbox (https://codesandbox.io/s/new) example below:

What is the expected behavior?

Which versions of React and react-helmet, and which browser / OS are affected by this issue?
Did this work in previous versions of React and/or react-helmet?

@Abhishekstudio Abhishekstudio changed the title Hello I recently used react helmet for changing title of all route links its perfectly working but the title is not change source code plz resolve this issue Aug 19, 2022
@AspectOfJerry
Copy link

You got the bug report template but you have to fill it!
It would greatly help others understand your problem and assist you.

So you're saying that it doesn't work. I don't think that the issue here is react-helmet but actually your code.

Here's how you import it:

import {Helmet} from 'react-helmet';

Here's how you can change a page's title:

<Helmet>
    <title>The title</title>
</Helmet>

Here's a very very simple example of a React Functional Component:

import React from 'react';
import {Helmet} from 'react-helmet';

const Home = () => {
    return (
        <>
            <Helmet>
                <title>The title</title>
            </Helmet>

            <h1>Home</h1>
            <p>Welcome to the home page!</p>
        </>
    );
};

export default Home;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants