Skip to content

ReactJS component to preview Google results based on Title, Description and URL

Notifications You must be signed in to change notification settings

hugodias/meta-preview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meta Preview - Demo

A simple ReactJS component to preview how a content will be rendered in Google based on Title, Description and URL.

Screenshot

Install

$ yarn add meta-preview

Usage

import React, { Component } from 'React';
import { MetaPreview } from 'meta-preview';

class MyComponent extends Component {
  constructor(props) {
    super(props);
      
    this.state = {
      title: "Post title",
      link: "https://medium.com/@hugooodias",
      description: "Post Description."
    };

    <!-- handle changes -->
  }

  render() {
    return (
      <MetaPreview
        {...this.state}
        onTitleChange={this.onTitleChange}
        onDescriptionChange={this.onDescriptionChange}
        onLinkChange={this.onLinkChange}
      />
    )
  }
}

Preview only

import { Preview } from 'meta-preview';

class MyComponent extends Component {
  constructor(props) {
    super(props);
      
    this.state = {
      title: "Post title",
      link: "https://medium.com/@hugooodias",
      description: "Post Description."
    };
  }

  render() {
    return (
      <Preview {...this.state} />
    )
  }
}  

About

ReactJS component to preview Google results based on Title, Description and URL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published