An open API service indexing awesome lists of open source software.

https://github.com/hustcc/react-adsense

:film_projector: a simple React-component for Google AdSense / Baidu advertisement.
https://github.com/hustcc/react-adsense

adsense advertisement baidu-advertisement google-adsense react react-component

Last synced: 3 months ago
JSON representation

:film_projector: a simple React-component for Google AdSense / Baidu advertisement.

Awesome Lists containing this project

README

        

# react-adsense

> react-adsense is a React-component for Google AdSense / Baidu advertisement.

[![Build Status](https://travis-ci.org/hustcc/react-adsense.svg?branch=master)](https://travis-ci.org/hustcc/react-adsense)
[![npm](https://img.shields.io/npm/v/react-adsense.svg)](https://www.npmjs.com/package/react-adsense)
[![npm](https://img.shields.io/npm/dm/react-adsense.svg)](https://www.npmjs.com/package/react-adsense)
[![npm](https://img.shields.io/npm/l/react-adsense.svg)](https://www.npmjs.com/package/react-adsense)
[![demo](https://img.shields.io/badge/LiveDemo-ClickHere-ff69b4.svg)](http://git.hust.cc/react-adsense/)

# 1. Install

> **npm install --save react-adsense**

Before use Google AdSense, you should add the `script` at the end of HTML.

```html

```

# 2. Usage

```jsx
import React from 'react';
import AdSense from 'react-adsense';

// ads with no set-up

// ads with custom format

// responsive and native ads

// auto full width responsive ads

```

# 3. Props

- Required props:
- `client`
- `slot`
- Optional props:
- `className`:
- `style`:
- `layout`:
- `layoutKey`:
- `format`:
- `responsive`:

# 4. TODO

- `Baidu` advertisement supported.

# LICENSE

MIT@[hustcc](https://github.com/hustcc).