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.
- Host: GitHub
- URL: https://github.com/hustcc/react-adsense
- Owner: hustcc
- License: mit
- Created: 2016-10-09T11:29:32.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-03-27T13:51:54.000Z (about 2 years ago)
- Last Synced: 2025-03-27T04:06:34.749Z (3 months ago)
- Topics: adsense, advertisement, baidu-advertisement, google-adsense, react, react-component
- Language: JavaScript
- Homepage: https://git.hust.cc/react-adsense
- Size: 359 KB
- Stars: 274
- Watchers: 7
- Forks: 43
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-adsense
> react-adsense is a React-component for Google AdSense / Baidu advertisement.
[](https://travis-ci.org/hustcc/react-adsense)
[](https://www.npmjs.com/package/react-adsense)
[](https://www.npmjs.com/package/react-adsense)
[](https://www.npmjs.com/package/react-adsense)
[](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).