These docs are written for a React or React Native developer building on
@livepeer/react or @livepeer/react-native.Installation
Install Livepeer React using your favorite package manager.- React
- React Native
Create a livepeer client
First, create a livepeerClient instance using
createReactClient, and pass a provider to it.
- React
- React Native
studioProvider which is
CORS-protected API key.
Read more about client configuration
Wrap app with LivepeerConfig
Next, wrap the app with the
LivepeerConfig component, passing the
client to it.
- React
- React Native
This is added to
_app.js for Next.js or App.js with Create React App, so that the
LivepeerConfig React Context is available across every component.Enjoy!
Use hooks! Every component inside theLivepeerConfig is now set up to use the
livepeer hooks.
- React
- React Native