react-google-ads

React component for google adsense

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
react-google-ads
711.0.56 years ago7 years agoMinified + gzip package size for react-google-ads in KB

Readme

React Google Ads
A Component for google adsense

Getting Started

# Installation with package manager
$ yarn add react react-dom react-google-ads
# or..
$ npm i -S react react-dom react-google-ads

Development

$ npm run demo

Production Bundle

$ npm run bundle

How to Use

Parameters

| Parameter | Type | Remarks | |:----------|:-------|:----------------| | client | string | Required | | slot | string | Required | | style | object | - | | format | string | default: 'auto' |

Basic

import React from 'react';
import ReactDOM from 'react-dom';
import GoogleAds from '../src';

const appRoot = document.getElementById('google-adsense');

ReactDOM.render(
  <GoogleAds
    client=""
    slot=""
    style={{ display: 'inline-block', width: '100%', }}
  />, appRoot
);

Change Log

1.0.0
  • Initial release

1.0.2
  • Added className property to add custom class to <ins> tag.

1.0.3
  • migrate webpack
  • migrate babel preset

1.0.4
  • fix typos in README.md

1.0.5
  • add prop-types for react^16