Skip to content

rupeshpadhye/add-bidder-demo

Repository files navigation

Add Bidder Demo

Demonstrates the React Hooks API and Context API usage This is demo client side add bidder library , client can consume this library to show adds on there sites

Local Development

Local development is broken into two parts (ideally using two tabs).

First, run rollup to watch your src/ module and automatically recompile it into dist/ whenever you make changes.

yarn start # runs rollup with watch flag

The second part will be running the example/ create-react-app that's linked to the local version of your module.

# (in another tab)
cd example
yarn start # runs create-react-app dev server
Example

Demo Example

Library Install

npm install --save add-bidder

Library Usage

import React, { Component } from 'react'
import { AddProvider, Add } from 'add-bidder';
import 'add-bidder/dist/index.css'

class App extends Component {
  render() {
    return (
         <AddProvider clientId="client-233434">
          <Add size="banner"/>
         </AddProvider>
    )
  }
}

Boilerplate Code

create-react-library