Provider 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.


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


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


import { createRenderer } from 'fela'

const renderer = createRenderer()

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

results matching ""

    No results matching ""