Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-pubg

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-pubg

React hooks for pubg.ts

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source



🐔
react-pubg




React hooks for pubg.ts

Package Version Package Monthly Downloads Docs

🚀 Install

Install it locally in your project

npm i --save react-pubg

# Or with Yarn

yarn add react-pubg

🦄 Usage

Sign for a developer account

You'll first need to sign up on the PUBG developer API site. Using this account you can create a API token

Register an app

With an account created, you can create a new developer application that will provide you with your API key.

Make something!

import { usePlayer } from "react-pubg";

function App() {
  const {
    data: player,
    loading,
    error,
  } = usePlayer({
    apiKey: "...",
    value: "WackyJacky101", // Or an array of player names
  });

  if (loading) return <>Loading...</>;

  if (error) return <>Error fetching player data</>;

  return <pre>{JSON.stringify(player, null, 4)}</pre>;
}

Keywords

FAQs

Package last updated on 07 Jan 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc