Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 944 Bytes

File metadata and controls

29 lines (22 loc) · 944 Bytes

RendererProvider

RendererProvider is used to pass the Fela renderer down to all your child components. It uses the context feature to do so. It actually is all you need to fully use Fela within your application.

Props

Property Type Description
renderer Renderer The Fela renderer which is used to actually render our styles.

Imports

import { RendererProvider } from 'react-fela'
import { RendererProvider } from 'preact-fela'
import { RendererProvider } from 'inferno-fela'

Example

import { createRenderer } from 'fela'

const renderer = createRenderer()

// Wrap your root application with the RendererProvider
// to pass down the renderer to every component using context
<RendererProvider renderer={renderer}>
  <App />
</RendererProvider>