Crafting a Dynamic SEO Hook in React: Integrating Meta and Open Graph Tags

Поділитися
Вставка
  • Опубліковано 17 лис 2024

КОМЕНТАРІ • 19

  • @sahilverma_dev
    @sahilverma_dev 7 місяців тому +6

    I don't think this will help in SEO and OG as these meta tags are getting generated client side. If I'm not wrong, we've to use SSR solutions for this like Next JS.

  • @naiduearle1367
    @naiduearle1367 3 місяці тому

    Can i update the meta images using the code in video, actually i have website with num of urls my requirment, while sharing the url through social media Apps like whatsapp facebook, i want particular preview meta image and description for the paeticular url.

  • @realg701
    @realg701 5 місяців тому

    will it work on social media?

  • @vishwampandey8493
    @vishwampandey8493 10 місяців тому +1

    this is helpful, but if I have a react blog website, how can we set different titles and meta tags for every blog post automatically.

    • @CodeRadiance
      @CodeRadiance  10 місяців тому +1

      By integrating it with a headless cms and dynamic routing.

  • @jojovarghese7089
    @jojovarghese7089 9 місяців тому

    What about React Helmet? Is it good?

    • @CodeRadiance
      @CodeRadiance  9 місяців тому +1

      Yeah its better than this code.

    • @soum-ik
      @soum-ik 3 місяці тому

      React helmet is not working for preview images. I did lot's of try​@@CodeRadiance

  • @kadiryumlu
    @kadiryumlu 10 місяців тому +1

    These metatags are still being rendered on client side.
    I don't think we can see them in the actual page source.

    • @CodeRadiance
      @CodeRadiance  10 місяців тому

      With client side react that's the only option you have. For server rendering use nextjs.

    • @kadiryumlu
      @kadiryumlu 10 місяців тому +1

      @@CodeRadiance Of course i know i need to use nextjs. I mean, your metatags are still invisible to search engines. And I don't believe that they will have any help for SEO like it is promised. 😥

    • @CodeRadiance
      @CodeRadiance  10 місяців тому

      Yeah it's probably more suited for analytics. I will probably add a video for nextjs.

    • @nishantk322
      @nishantk322 9 місяців тому

      @@CodeRadiance but if i don't want to use nextjs and i have website in reactjs so how can do the same in server side from reactjs

    • @vokes4582
      @vokes4582 8 місяців тому

      Have you found a way to do it?

  • @aleksandrmatyka3118
    @aleksandrmatyka3118 5 днів тому

    This has nothing to do with Open Graph, don't mislead people. SSR is required!
    There’s nothing genius about creating a meta tag using the DOM(