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.Create a livepeer client
First, create a livepeerClient
instance using
createReactClient
, and pass a provider to it.
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.
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.