Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/douyacun/react-ssr-adsense
react服务端渲染接google adsense
https://github.com/douyacun/react-ssr-adsense
Last synced: about 2 months ago
JSON representation
react服务端渲染接google adsense
- Host: GitHub
- URL: https://github.com/douyacun/react-ssr-adsense
- Owner: douyacun
- Created: 2021-01-18T02:43:38.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-18T03:45:42.000Z (about 4 years ago)
- Last Synced: 2024-11-21T01:15:02.189Z (2 months ago)
- Language: JavaScript
- Size: 33.2 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
@hustcc react-adsense 不支持服务端渲染框架,受 [react-adsense](https://www.npmjs.com/package/react-adsense) 启发写了 react-ssr-adsense
# react-ssr-adsense
react-ssr-adsense is a React-ssr-component for Google AdSense。support #nextjs
[![npm](https://img.shields.io/npm/v/react-ssr-adsense.svg)](https://www.npmjs.com/package/react-ssr-adsense)
[![npm](https://img.shields.io/npm/dm/react-ssr-adsense.svg)](https://www.npmjs.com/package/react-ssr-adsense)
[![npm](https://img.shields.io/npm/l/react-ssr-adsense.svg)](https://www.npmjs.com/package/react-ssr-adsense)demo: [https://www.douyacun.com](https://www.douyacun.com)
# 1. Install
> **npm install --save react-ssr-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-ssr-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`:# LICENSE
MIT@[douyacun](https://github.com/douyacun).