
Security News
Official Go SDK for MCP in Development, Stable Release Expected in August
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
A React implementation of the google [DFP](https://developers.google.com/doubleclick-gpt/reference "GPT Reference") API. This package is inspired in the awesome library [jquery.dfp](https://github.com/coop182/jquery.dfp.js), and aims to provide its same e
A React implementation of the google DFP API. This package is inspired in the awesome library jquery.dfp, and aims to provide its same ease of usage but, of course, taking into consideration the react concepts & lifecycle features.
To install just run the following command (no other dependencies are required):
npm install --save react-dfp
or
yarn add react-dfp
You can find more details in the React-dfp site.
React-dfp has been designed in a very React-ish way, its main goal is to be able to serve DFP ads in your React application just using React components, which means that you won't have to programmatically perform any initialization call when your page loads.
Here a quick example, notice that ads will render in your page as soon as your component is mounted, through its components (DFPSlotsProvider and AdSlot), react-dfp is making a full abstraction of the google dfp/gpt API.
import React, { Component } from 'react';
import { DFPSlotsProvider, AdSlot } from 'react-dfp';
...
class Page extends Component {
render() {
...
return (
<DFPSlotsProvider>
...
<AdSlot adUnit="home/leaderboard" sizes={[ [900, 90], [728, 90]]} />
...
/* you can override the props */
<AdSlot adUnit="home/mobile" sizes={[ [300, 250], [300, 600]]} />
...
<div>
...
<AdSlot adUnit="home/footer" sizes={[ [300, 250], [300, 600]]} />
...
</div>
...
</DFPSlotsProvider>
);
}
}
See the React-dfp site for more examples (basic example, how to have refreshable ads, etc).
You can find the React-dfp documentation on the website. The site is divided into many sections that describe each one the Components, properties and also the DFPManager API (in case you need to use this one manually).
The website is also full of live/working examples.
You can find the source code of the website here: https://github.com/jaanauati/react-dfp-website.
I certainly know that test cases need to be improved, but, as long as your syntax is clean, submit test cases and, of course, all the interfaces are kept working, all kind of contribution is welcome.
Pull requests are welcome 🍻.
FAQs
A React implementation of the google [DFP](https://developers.google.com/doubleclick-gpt/reference "GPT Reference") API. This package is inspired in the awesome library [jquery.dfp](https://github.com/coop182/jquery.dfp.js), and aims to provide its same e
The npm package react-dfp receives a total of 6,395 weekly downloads. As such, react-dfp popularity was classified as popular.
We found that react-dfp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.