Category : react-helmet

I’m trying to use react helmet to create metas, but when i test them they don’t seem to work at all. Here is my code below: <div className=”post-header-main” ref={parentRef}> <Helmet> <title>{title[0]}</title> <meta name=”description” content=”Blog on webber” /> <meta name=”og:title” content={title} /> <meta name=”og:url” content={“https://www.webber.com” + pathname} /> <meta name=”og:description” content=”Blog on webber” /> <meta name=”og:image” ..

Read more

This is my server.js import App from ‘./App’; import React from ‘react’; import { StaticRouter } from ‘react-router-dom’; import express from ‘express’;; import { renderToStaticNodeStream } from ‘react-dom/server’; import {Helmet} from ‘react-helmet’ const assets = require(process.env.RAZZLE_ASSETS_MANIFEST); const server = express(); const helmet = Helmet.renderStatic() server .disable(‘x-powered-by’) .use(express.static(process.env.RAZZLE_PUBLIC_DIR)) .get(‘/*’, (req, res) => { const context = ..

Read more

Recently, I started playing with meta tags in react. After some research, I found that react-helmet-async is the best library to set meta tags for each page. however, I wanted to want set meta tags for few pages conditionally. I setup metatags for two pages differently, take a look… index.js ReactDOM.render( <React.StrictMode> <HelmetProvider> <App/> </HelmetProvider> ..

Read more

I am trying to share images and video on social media ( mostly FB,twitter,linkedIn )in reactjs app , have added react-helmet for the same but still unable to share image below is the link which i am referring and my code. https://medium.com/camperstribe/react-social-media-integration-with-react-share-and-react-helmet-84d9def6a445 Above solution is not working import React from "react"; import { Helmet } ..

Read more